Spec cleanups

This commit is contained in:
Daniel Berteaud 2018-02-19 15:50:53 +01:00
parent 746cac8f34
commit 67b38d9733
2 changed files with 65 additions and 91 deletions

View File

@ -1,5 +1,3 @@
%define modn c_icap
Summary: An implementation of an ICAP server Summary: An implementation of an ICAP server
Name: c-icap Name: c-icap
Version: 0.5.3 Version: 0.5.3
@ -9,16 +7,15 @@ License: LGPL
Source0: http://sourceforge.net/projects/c-icap/files/c-icap/0.5.x/c_icap-%{version}.tar.gz Source0: http://sourceforge.net/projects/c-icap/files/c-icap/0.5.x/c_icap-%{version}.tar.gz
Source1: %{name}.service Source1: %{name}.service
Source2: %{name}.logrotate Source2: %{name}.logrotate
Source4: %{name}.conf Source4: tmpfiles.conf
URL: http://%{name}.sourceforge.net/ URL: http://%{name}.sourceforge.net/
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release}
Requires(post): systemd
Requires(preun): systemd BuildRequires: db4-devel
Requires(postun): systemd BuildRequires: gdbm-devel
BuildRequires: systemd BuildRequires: openldap-devel
BuildRequires: db4-devel gdbm-devel openldap-devel
BuildRequires: zlib-devel perl-devel BuildRequires: zlib-devel perl-devel
%description %description
@ -37,8 +34,6 @@ Requires: zlib-devel
%description devel %description devel
The %{name}-devel package contains the static libraries and header files The %{name}-devel package contains the static libraries and header files
for developing software using %{name}. for developing software using %{name}.
# RUN_AS="c-icap"
%package ldap %package ldap
Summary: The LDAP module for %{name} Summary: The LDAP module for %{name}
@ -48,7 +43,6 @@ Requires: %{name} = %{version}-%{release}
%description ldap %description ldap
The %{name}-ldap package contains the LDAP module for %{name}. The %{name}-ldap package contains the LDAP module for %{name}.
%package libs %package libs
Summary: Libraries used by %{name} Summary: Libraries used by %{name}
Group: System Environment/Libraries Group: System Environment/Libraries
@ -76,11 +70,12 @@ Requires: %{name}-libs = %{version}-%{release}
The %{name}-progs package contains several commandline tools for %{name}. The %{name}-progs package contains several commandline tools for %{name}.
%prep %prep
%setup -q -n %{modn}-%{version} %setup -q -n c_icap-%{version}
%build %build
%configure \ %configure \
CFLAGS="${RPM_OPT_FLAGS} -fno-strict-aliasing" \ CFLAGS="${RPM_OPT_FLAGS} -fno-strict-aliasing" \
--disable-static \
--sysconfdir=%{_sysconfdir}/%{name} \ --sysconfdir=%{_sysconfdir}/%{name} \
--prefix='' \ --prefix='' \
--with-perl \ --with-perl \
@ -96,7 +91,7 @@ The %{name}-progs package contains several commandline tools for %{name}.
[ -n "%{buildroot}" -a "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} [ -n "%{buildroot}" -a "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
%{__mkdir_p} %{buildroot}%{_sysconfdir}/logrotate.d %{__mkdir_p} %{buildroot}%{_sysconfdir}/logrotate.d
%{__mkdir_p} %{buildroot}%{_sbindir} %{__mkdir_p} %{buildroot}%{_sbindir}
%{__mkdir_p} %{buildroot}%{_datadir}/%{modn}/{contrib,templates} %{__mkdir_p} %{buildroot}%{_datadir}/c_icap/{contrib,templates}
%{__mkdir_p} %{buildroot}%{_localstatedir}/log/%{name} %{__mkdir_p} %{buildroot}%{_localstatedir}/log/%{name}
%{__make} DESTDIR=%{buildroot} install %{__make} DESTDIR=%{buildroot} install
@ -104,7 +99,7 @@ The %{name}-progs package contains several commandline tools for %{name}.
%{__install} -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} %{__install} -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
%{__install} -D -p -m 0644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/%{name}.conf %{__install} -D -p -m 0644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/%{name}.conf
%{__install} -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/c-icap.service %{__install} -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/c-icap.service
%{__install} -m 0755 contrib/*.pl %{buildroot}%{_datadir}/%{modn}/contrib %{__install} -m 0755 contrib/*.pl %{buildroot}%{_datadir}/c_icap/contrib
%{__rm} -f %{buildroot}%{_libdir}/lib*.so.{?,??} %{__rm} -f %{buildroot}%{_libdir}/lib*.so.{?,??}
@ -143,14 +138,14 @@ exit 0 # Always pass
%attr(640,root,%{name}) %{_sysconfdir}/%{name}/*.default %attr(640,root,%{name}) %{_sysconfdir}/%{name}/*.default
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%{_unitdir}/c-icap.service %{_unitdir}/c-icap.service
%dir %{_libdir}/%{modn} %dir %{_libdir}/c_icap
%{_libdir}/%{modn}/bdb_tables.so %{_libdir}/c_icap/bdb_tables.so
%{_libdir}/%{modn}/dnsbl_tables.so %{_libdir}/c_icap/dnsbl_tables.so
%{_libdir}/%{modn}/srv_echo.so %{_libdir}/c_icap/srv_echo.so
%{_libdir}/%{modn}/sys_logger.so %{_libdir}/c_icap/sys_logger.so
%{_libdir}/%{modn}/shared_cache.so %{_libdir}/c_icap/shared_cache.so
%{_sbindir}/%{name} %{_sbindir}/%{name}
%{_datadir}/%{modn} %{_datadir}/c_icap
%{_mandir}/man8/%{name}.8* %{_mandir}/man8/%{name}.8*
%attr(750,%{name},%{name}) %dir %{_localstatedir}/log/%{name} %attr(750,%{name},%{name}) %dir %{_localstatedir}/log/%{name}
%attr(750,%{name},%{name}) %dir %{_localstatedir}/run/%{name} %attr(750,%{name},%{name}) %dir %{_localstatedir}/run/%{name}
@ -159,33 +154,33 @@ exit 0 # Always pass
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%{_bindir}/%{name}-*config %{_bindir}/%{name}-*config
%{_includedir}/%{modn} %{_includedir}/c_icap
%{_libdir}/libicapapi.*a %{_libdir}/libicapapi.*a
%{_libdir}/libicapapi.so %{_libdir}/libicapapi.so
%{_libdir}/%{modn}/bdb_tables.*a %{_libdir}/c_icap/bdb_tables.*a
%{_libdir}/%{modn}/dnsbl_tables.*a %{_libdir}/c_icap/dnsbl_tables.*a
%{_libdir}/%{modn}/ldap_module.*a %{_libdir}/c_icap/ldap_module.*a
%{_libdir}/%{modn}/perl_handler.*a %{_libdir}/c_icap/perl_handler.*a
%{_libdir}/%{modn}/srv_echo.*a %{_libdir}/c_icap/srv_echo.*a
%{_libdir}/%{modn}/sys_logger.*a %{_libdir}/c_icap/sys_logger.*a
%{_libdir}/%{modn}/srv_ex206.*a %{_libdir}/c_icap/srv_ex206.*a
%{_libdir}/%{modn}/shared_cache.*a %{_libdir}/c_icap/shared_cache.*a
%{_mandir}/man8/%{name}-*config.8* %{_mandir}/man8/%{name}-*config.8*
%files ldap %files ldap
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/%{modn}/ldap_module.so %{_libdir}/c_icap/ldap_module.so
%files libs %files libs
%defattr(-,root,root) %defattr(-,root,root)
%doc COPYING %doc COPYING
%{_libdir}/libicapapi.so.* %{_libdir}/libicapapi.so.*
%{_libdir}/%{modn}/srv_ex206.so %{_libdir}/c_icap/srv_ex206.so
%files perl %files perl
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/%{modn}/perl_handler.so %{_libdir}/c_icap/perl_handler.so
%files progs %files progs
%defattr(-,root,root) %defattr(-,root,root)
@ -200,29 +195,8 @@ exit 0 # Always pass
%changelog %changelog
* Sun Feb 18 2018 Daniel Berteaud <daniel@firewall-services.com> 0.5.3-1 * Sun Feb 18 2018 Daniel Berteaud <daniel@firewall-services.com> 0.5.3-1
- Stable release - Stable release
- Clean spec file
* Sun Feb 18 2018 Daniel Berteaud <daniel@firewall-services.com> 0.5.3-0.beta3 - Use syslog for daemon logging
- Re-add logrotate, only for access.log (daniel@firewall-services.com)
- prefix should even be empty (daniel@firewall-services.com)
- Set prefix to root (daniel@firewall-services.com)
- Remove ENv file in service file (daniel@firewall-services.com)
* Sun Feb 18 2018 Daniel Berteaud <daniel@firewall-services.com> 0.5.3-0.beta2
- Remove logrotate file (daniel@firewall-services.com)
- Remove sysconfig and logrotate. ANd change the unit to simple
(daniel@firewall-services.com)
- Small cleanups in spec (daniel@firewall-services.com)
- Spec fixes (daniel@firewall-services.com)
- git-annex in dani@bernadette-lapiole-org:~/src/c-icap (daniel@firewall-
services.com)
- Remove sources tarballs (daniel@firewall-services.com)
- git-annex in dani@bernadette-lapiole-org:~/src/c-icap (daniel@firewall-
services.com)
* Sun Feb 18 2018 Daniel Berteaud <daniel@firewall-services.com> 0.5.3-0.beta1
- new package built with tito
* Sun Feb 18 2018 Daniel Berteaud <daniel@firewall-services.com> - 0.5.3
- Update to 0.5.3 - Update to 0.5.3
* Wed Sep 27 2017 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 0.5.2 * Wed Sep 27 2017 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 0.5.2