File gnarwl.spec of Package gnarwl
Summary: Gnu Neat Auto Reply With LDAP
Name: gnarwl
Version: 3.6
Release: 28.1
License: GPL
Group: Productivity/Networking/Email/Utilities
Source0: %{name}-%{version}.tgz
Patch0: %{name}-DESTDIR.patch
Patch1: %{name}-opt.patch
URL: http://www.onyxbits.de/gnarwl
Packager: Peer Heinlein <p.heinlein@heinlein-support.de>
PreReq: %insserv_prereq, %fillup_prereq /usr/sbin/useradd /usr/sbin/groupadd
BuildRequires: autoconf
BuildRequires: gdbm-devel
BuildRequires: groff
BuildRequires: pwdutils
BuildRequires: patch
BuildRequires: make
%if %{?suse_version:1}0
BuildRequires: openldap2-devel
BuildRequires: openldap2-client
BuildRequires: libldap-2_4-2
#BuildRequires: openldap2-devel >= 2.3.0
%define schemadir /etc/openldap/schema
%else
BuildRequires: openldap-devel >= 2.3.0
%define schemadir /usr/share/openldap/schema
%endif
#Requires(postun): /usr/sbin/groupdel
#Requires(postun): /usr/sbin/userdel
#Requires(pre): /bin/id
#Requires(pre): /usr/bin/getgid
# Requires(pre): groupadd
#Requires(pre): /usr/sbin/useradd
Provides: group(gnarwl)
Provides: user(gnarwl)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Gnarwl is a email auto reply/vacation tool, intended to be used on
mailservers, on which users may not (nescessarily) have
system accoounts, but where user information is stored in LDAP.
%package openldap-schema-ISPEnv2
Summary: LDAP schema for gnarwl
Group: Networking/Daemons
PreReq: %insserv_prereq, %fillup_prereq /usr/sbin/useradd /usr/sbin/groupadd
Requires(post,postun): sed >= 4.0
Requires: sed >= 4.0
%if %{?suse_version:1}0
Requires: openldap2
%else
Requires: openldap-servers
%endif
%description openldap-schema-ISPEnv2
This package contains ISPEnv2.schema to be used with gnarwl.
%prep
%setup -q
#%patch0 -p1
#%patch1 -p1
%build
%{__autoconf}
%configure \
--with-homedir=/var/lib/gnarwl
%{__make}
%install
#rm -rf $RPM_BUILD_ROOT
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
install -D doc/ISPEnv2.schema $RPM_BUILD_ROOT%{schemadir}/ISPEnv2.schema
rm -rf $RPM_BUILD_ROOT/usr/share/doc/packages/gnarwl
%clean
rm -rf $RPM_BUILD_ROOT
%pre
/usr/sbin/groupadd -r gnarwl || :
/usr/sbin/useradd -r -d /var/lib/gnarwl -s /usr/bin/gnarwl -c "Gnarwl User" -g gnarwl gnarwl 2>/dev/null || :
%post
%postun
if [ $1 = 0 ]; then
if [ `getent passwd gnarwl | wc -l` = 1 ]; then
/usr/sbin/userdel gnarwl
fi
if [ `getent group gnarwl | wc -l` = 1 ]; then
/usr/sbin/groupdel gnarwl
fi
fi
%post openldap-schema-ISPEnv2
#%openldap_schema_register %{schemadir}/ISPEnv2.schema -d core,cosine
#%service -q ldap restart
%postun openldap-schema-ISPEnv2
#if [ "$1" = "0" ]; then
# %openldap_schema_unregister %{schemadir}/ISPEnv2.schema
# %service -q ldap restart
#fi
%files
%defattr(644,root,root,755)
%doc doc/{AUTHORS,FAQ,HISTORY,INSTALL,ISPEnv.schema,LICENSE,README,README.upgrade,example.ldif}
%attr(755,root,root) %{_bindir}/*
%attr(755,root,root) %{_sbindir}/*
%config(noreplace) %verify(not md5 mtime size) %attr(640,root,gnarwl) %{_sysconfdir}/gnarwl.cfg
%attr(755,root,gnarwl) %dir %{_var}/lib/gnarwl
%attr(775,root,gnarwl) %dir %{_var}/lib/gnarwl/block
%attr(755,root,gnarwl) %dir %{_var}/lib/gnarwl/bin
%attr(640,root,gnarwl) %{_var}/lib/gnarwl/.forward
%attr(660,root,gnarwl) %{_var}/lib/gnarwl/blacklist.db
%attr(660,root,gnarwl) %{_var}/lib/gnarwl/badheaders.db
%config(noreplace) %verify(not md5 mtime size) %attr(640,root,gnarwl) %{_var}/lib/gnarwl/footer.txt
%config(noreplace) %verify(not md5 mtime size) %attr(640,root,gnarwl) %{_var}/lib/gnarwl/header.txt
%{_mandir}/man*/*
%files openldap-schema-ISPEnv2
%defattr(644,root,root,755)
%dir /etc/openldap
%dir %{schemadir}
%{schemadir}/*.schema
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} Peer Heinlein <p.heinlein@heinlein-support.de>
Revision 1.25 2006/09/09 01:23:28 <p.heinlein@heinlein-support.de>
- Update to gnarwl 3.5
- Protects changes in footer.txt and header.txt when updating gnarwl
Revision 1.24 2006/09/09 01:23:28 glen
- rel 6 (rebuild with fixed %%useradd/%%groupadd macros)
Revision 1.23 2006/07/20 14:41:42 qboosh
- pl for openldap-schema-ISPEnv2
Revision 1.22 2006/07/20 09:40:30 glen
- rpm macros for %%openldap_schema_*
Revision 1.21 2006/07/20 09:04:17 glen
- adjust few obvious permissions
Revision 1.20 2006/07/20 08:56:49 glen
- subpackage for ldap schema (openldap-schema-ISPEnv2)
- let root own the files
Revision 1.19 2006/04/15 12:58:22 glen
- rel 5
Revision 1.18 2006/01/17 15:24:25 baggins
- release 4
- BR openldap 2.3
Revision 1.17 2005/06/26 18:51:40 glen
- updated URL and Source0
Revision 1.16 2005/05/02 18:23:51 glen
- adapterized
Revision 1.15 2005/05/01 17:31:30 glen
- use %useradd/%groupadd macros
Revision 1.14 2004/10/15 13:27:59 ankry
- %userremove/%groupremove support, some standarization
Revision 1.13 2004/08/08 15:49:10 ankry
- spaces -> tabs
Revision 1.12 2004/07/03 13:48:11 zergin
- added BR: groff (by Zbyniu Krzystolik)
Revision 1.11 2004/04/13 14:45:19 adamg
- release 3 to rebuild with new openldap
Revision 1.10 2004/03/16 14:17:16 averne
- rel 2 for rebuild with new openldap
Revision 1.9 2004/03/10 14:22:39 qboosh
- update to 3.3 (partially by abram), updated patches, added pre/postun deps
Revision 1.8 2003/06/06 12:19:20 qboosh
- updated feedback address
Revision 1.7 2003/05/26 16:25:02 malekith
- massive attack: adding Source-md5
Revision 1.6 2003/05/25 05:48:03 misi3k
- massive attack s/pld.org.pl/pld-linux.org/
Revision 1.5 2003/05/17 06:32:05 pascalek
- revert user changes
Revision 1.4 2003/05/10 10:12:58 pascalek
- Req user-gnarwl
Revision 1.3 2002/05/27 09:42:11 qboosh
- opt patch, use proper CC, cosmetics
Revision 1.2 2002/05/27 09:06:48 kura
- fixed path in .forward file
Revision 1.1 2002/05/27 08:46:28 kura
- spec written from scrach