version .ini file separately
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 17 Oct 2017 17:35:21 +0000 (20:35 +0300)
committerElan Ruusamäe <glen@pld-linux.org>
Tue, 17 Oct 2017 17:35:46 +0000 (20:35 +0300)
mongodb.ini [new file with mode: 0644]
php-pecl-mongodb.spec

diff --git a/mongodb.ini b/mongodb.ini
new file mode 100644 (file)
index 0000000..cdf76bd
--- /dev/null
@@ -0,0 +1,5 @@
+; Enable mongodb extension module
+extension=mongodb.so
+
+; Configuration
+;mongodb.debug=''
index c6c9cf1..5a9966f 100644 (file)
@@ -12,6 +12,7 @@ License:      Apache v2.0
 Group:         Development/Languages/PHP
 Source0:       https://pecl.php.net/get/%{modname}-%{version}.tgz
 # Source0-md5: c3b36a24b7e47e3b4148cd9bc4d163b2
+Source1:       mongodb.ini
 URL:           https://pecl.php.net/package/mongodb
 BuildRequires: %{php_name}-devel >= 4:5.4.0
 BuildRequires: rpmbuild(macros) >= 1.666
@@ -38,15 +39,6 @@ MongoDB driver.
 %setup -qc
 mv %{modname}-%{version}/* .
 
-# Create configuration file
-cat << 'EOF' > %{modname}.ini
-; Enable %{summary} extension module
-extension=%{modname}.so
-
-; Configuration
-;mongodb.debug=''
-EOF
-
 %build
 # Sanity check, really often broken
 extver=$(sed -n '/#define PHP_MONGODB_VERSION/{s/.* "//;s/".*$//;p}' php_phongo.h)
@@ -98,7 +90,7 @@ rm -rf $RPM_BUILD_ROOT
        INSTALL_ROOT=$RPM_BUILD_ROOT
 
 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
-cp -p %{modname}.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
+cp -p %{SOURCE1}.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
 
 %clean
 rm -rf $RPM_BUILD_ROOT
This page took 0.095449 seconds and 4 git commands to generate.