]> git.pld-linux.org Git - projects/template-specs.git/blobdiff - apache-module.spec
dokuwiki-plugin.spec: Fix packaging languages with rpm 4.12
[projects/template-specs.git] / apache-module.spec
index a817561a4bc8af7e52f564d5334bb1a7077d6cf4..95577e76095d7743e342a28dd142818c45e6e55b 100644 (file)
@@ -4,17 +4,17 @@
 # for new packages.
 #
 %define                mod_name        MODNAME
-%define        apxs            %{_sbindir}/apxs
-Summary:       Apache module: ..
+%define                apxs            %{_sbindir}/apxs
+Summary:       Apache HTTPD module: ..
 Summary(pl.UTF-8):     ModuĊ‚ Apache'a: ...
 Name:          apache-mod_%{mod_name}
 Version:       -
 Release:       0.1
 License:       - (enter Apache/GPL/LGPL/BSD/BSD-like/other license name here)
-Group:         Networking/Daemons
+Group:         Networking/Daemons/HTTP
 Source0:       -
 # Source0-md5: -
-Source1:       %{name}.conf
+Source1:       apache.conf
 URL:           -
 BuildRequires: %{apxs}
 BuildRequires: apache-devel >= 2.2
@@ -26,7 +26,7 @@ BuildRoot:    %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
 
 %description
-MODNAME is Apache module...
+MODNAME is Apache HTTPD module...
 
 %description -l pl.UTF-8
 
@@ -39,13 +39,12 @@ MODNAME is Apache module...
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
-
-install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
+install -p mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
 
 # module configuration
 # - should contain LoadModule line
 # - and directives must be between IfModule (so user could disable the module easily)
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf
 
 # or, if no directives needed, put just LoadModule line
 echo 'LoadModule %{mod_name}_module    modules/mod_%{mod_name}.so' > \
@@ -55,40 +54,15 @@ echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \
 rm -rf $RPM_BUILD_ROOT
 
 %post
-%service apache restart
+%service -q httpd restart
 
 %postun
 if [ "$1" = "0" ]; then
-       %service -q apache restart
-fi
-
-%if 0 # triggers for upgrading from pre confdir module
-# if there was "Include modulename.conf"
-%triggerpostun -- %{name} < VERSION
-if grep -q '^Include conf\.d/\*\.conf' /etc/apache/apache.conf; then
-       %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
-       sed -i -e '
-               /^Include.*mod_%{mod_name}\.conf/d
-' /etc/apache/apache.conf
-else
-       # they're still using old apache.conf
-       sed -i -e '
-               s,^Include.*mod_%{mod_name}\.conf,Include %{_sysconfdir}/*_mod_%{mod_name}.conf,
-' /etc/apache/apache.conf
+       %service -q httpd restart
 fi
-%service -q apache restart
-
-# or, if there was just apxs usage
-%triggerpostun -- apache1-mod_%{mod_name} < VERSION
-# check that they're not using old apache.conf
-if grep -q '^Include conf\.d/\*\.conf' /etc/apache/apache.conf; then
-       %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
-fi
-
-%endif
 
 %files
 %defattr(644,root,root,755)
 %doc README
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
-%attr(755,root,root) %{_pkglibdir}/*
+%attr(755,root,root) %{_pkglibdir}/mod_%{mod_name}.so
This page took 0.041429 seconds and 4 git commands to generate.