]> git.pld-linux.org Git - projects/template-specs.git/commitdiff
- use macros
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 6 Jun 2005 07:22:19 +0000 (07:22 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    webapp.spec -> 1.14

webapp.spec

index 74b21ffc9a36eb29670681f7a03e5fa8f6c2aa9f..cd1f21de4bba82fd0be344949b0cf0b5edbe5cda 100644 (file)
@@ -5,6 +5,7 @@ Version:        0.1
 Release:       0.19
 License:       GPL
 Group:         Development
+BuildRequires: rpmbuild(macros) >= 1.221
 Requires:      apache >= 1.3.33-2
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -22,57 +23,23 @@ konfiguracji pakietu do katalogu konfiguracyjnego apache1/apache2.
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_sysconfdir}
+
+#install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache-%{name}.conf
 cat >> $RPM_BUILD_ROOT%{_sysconfdir}/apache-%{name}.conf <<EOF
 # This is sample apache config
 EOF
 
 %triggerin -- apache1 >= 1.3.33-2
-%{?debug:set -x; echo "triggerin apache1 %{name}-%{version}-%{release} 1:[$1]; 2:[$2]"}
-if [ "$1" = "1" ] && [ "$2" = "1" ] && [ -d /etc/apache/conf.d ]; then
-       ln -sf %{_sysconfdir}/apache-%{name}.conf /etc/apache/conf.d/99_%{name}.conf
-fi
-# restart apache if the config symlink is there
-if [ -L /etc/apache/conf.d/99_%{name}.conf ]; then
-       if [ -f /var/lock/subsys/apache ]; then
-               /etc/rc.d/init.d/apache restart 1>&2
-       fi
-fi
+%apache_config_install -v 1 -c %{_sysconfdir}/apache-%{name}.conf
 
 %triggerun -- apache1 >= 1.3.33-2
-%{?debug:set -x; echo "triggerun apache1 %{name}-%{version}-%{release}: 1:[$1]; 2:[$2]"}
-# remove link if eighter of the packages are gone
-if [ "$1" = "0" ] || [ "$2" = "0" ]; then
-       if [ -L /etc/apache/conf.d/99_%{name}.conf ]; then
-               rm -f /etc/apache/conf.d/99_%{name}.conf
-               if [ -f /var/lock/subsys/apache ]; then
-                       /etc/rc.d/init.d/apache restart 1>&2
-               fi
-       fi
-fi
+%apache_config_uninstall -v 1
 
 %triggerin -- apache >= 2.0.0
-%{?debug:set -x; echo "triggerin apache2 %{name}-%{version}-%{release}: 1:[$1]; 2:[$2]"}
-if [ "$1" = "1" ] && [ "$2" = "1" ] && [ -d /etc/httpd/httpd.conf ]; then
-       ln -sf %{_sysconfdir}/apache-%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
-fi
-# restart apache if the config symlink is there
-if [ -L /etc/httpd/httpd.conf/99_%{name}.conf ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-fi
+%apache_config_install -v 2 -c %{_sysconfdir}/apache-%{name}.conf
 
 %triggerun -- apache >= 2.0.0
-%{?debug:set -x; echo "triggerun apache2 %{name}-%{version}-%{release}: 1:[$1]; 2:[$2]"}
-# remove link if eighter of the packages are gone
-if [ "$1" = "0" ] || [ "$2" = "0" ]; then
-       if [ -L /etc/httpd/httpd.conf/99_%{name}.conf ]; then
-               rm -f /etc/httpd/httpd.conf/99_%{name}.conf
-               if [ -f /var/lock/subsys/httpd ]; then
-                       /etc/rc.d/init.d/httpd restart 1>&2
-               fi
-       fi
-fi
+%apache_config_uninstall -v 2
 
 %if 00000000000000000000000000000000000
 # SAMPLE TRIGGER FOR MIGRATION PURPOSES
@@ -116,4 +83,6 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache-%{name}.conf
+#%attr(750,root,http) %dir %{_sysconfdir}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache-%{name}.conf
+#%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php
This page took 0.032345 seconds and 4 git commands to generate.