File majordomo.spec of Package majordomo

#
# spec file for package majordomo (Version 1.94.5)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

Name:           majordomo
BuildRequires:  pam-devel
URL:            http://www.greatcircle.com/majordomo/
License:        Other License(s), see package
Group:          Productivity/Networking/Email/Mailinglists
Summary:        Mailing List Software
Autoreqprov:    on
Version:        1.94.5
Release:        324
Source:         majordomo-%{version}.tar.gz
Source1:        majordomo-wrapper.8.tgz
Patch0:         majordomo-%{version}.SuSE.diff
Patch1:         majordomo-%{version}.hostile_adress.patch
Patch2:         majordomo-%{version}.decl.patch
Patch3:         majordomo-%{version}.destdir.patch
Prereq:         /usr/sbin/useradd /usr/sbin/groupadd permissions
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Majordomo provides an easy to configure means of maintaining mailing
lists.



Authors:
--------
    D. Brent Chapman <Brent@GreatCircle.COM>
    Alan Millar <amillar@bolis.sf-bay.org>
    Paul Haas <paulh@hamjudo.mi.org>
    Jon Luini <jon@luini.com>
    John P. Rouillard <rouilj@dstar.iddis.com>

%prep
%setup
%setup -a 1 
%patch
%patch -P 1
%patch2
%patch3

%build
make wrapper

%install
#/usr/sbin/groupadd -g 28 -o -r mdom 2> /dev/null || :
#/usr/sbin/useradd -r -o -g mdom -u 28 -s /bin/bash -c "Mailing list agent" \
# -d /usr/lib/majordomo mdom 2> /dev/null || :
mkdir -p -m 755 $RPM_BUILD_ROOT/etc
mkdir -p -m 755 $RPM_BUILD_ROOT/usr/bin
mkdir -p -m 755 $RPM_BUILD_ROOT/%_mandir/{man1,man8}
mkdir -p -m 755 $RPM_BUILD_ROOT/usr/lib/majordomo
mkdir -p -m 755 $RPM_BUILD_ROOT/var/lib/majordomo{,/lists,/archive,/digest,/tmp}
touch $RPM_BUILD_ROOT/var/lib/majordomo/Log
#chmod 660 $RPM_BUILD_ROOT/var/lib/majordomo/Log
#chown mdom:mdom -R $RPM_BUILD_ROOT/var/lib/majordomo
make DESTDIR=$RPM_BUILD_ROOT MAN=%{_mandir} install install-wrapper
mv README README.majordomo
gzip -f $RPM_BUILD_ROOT%{_mandir}/man1/approve.1
gzip -f $RPM_BUILD_ROOT%{_mandir}/man1/bounce-remind.1
gzip -f $RPM_BUILD_ROOT%{_mandir}/man1/bounce.1
gzip -f $RPM_BUILD_ROOT%{_mandir}/man1/digest.1
gzip -f $RPM_BUILD_ROOT%{_mandir}/man1/resend.1
gzip -f $RPM_BUILD_ROOT%{_mandir}/man8/majordomo.8

%pre
/usr/sbin/groupadd -g 28 -o -r mdom 2> /dev/null || :
/usr/sbin/useradd -r -o -g mdom -u 28 -s /bin/bash -c "Mailing list agent" \
-d /usr/lib/majordomo mdom 2> /dev/null || :

%post
%run_permissions

%verifyscript
%verify_permissions -e /usr/lib/majordomo/wrapper

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc README.majordomo README.linux
%doc FUTURE INSTALL NEWLIST NEWS Doc/{[FRdflq]*,maj*}
%dir /usr/lib/majordomo/Tools
%dir /usr/lib/majordomo
%dir %attr(755,mdom,mdom) /var/lib/majordomo
%dir %attr(755,mdom,mdom) /var/lib/majordomo/archive
%dir %attr(755,mdom,mdom) /var/lib/majordomo/digest
%dir %attr(755,mdom,mdom) /var/lib/majordomo/lists
%dir %attr(755,mdom,mdom) /var/lib/majordomo/tmp
%config /etc/majordomo.cf
/usr/bin/approve
/usr/bin/bounce
/usr/bin/medit
/usr/lib/majordomo/Tools/archive.pl
/usr/lib/majordomo/Tools/archive_mh.pl
/usr/lib/majordomo/Tools/digest.send
/usr/lib/majordomo/Tools/logsummary.pl
/usr/lib/majordomo/Tools/makeindex.pl
/usr/lib/majordomo/Tools/new-list
/usr/lib/majordomo/Tools/sequencer
/usr/lib/majordomo/archive2.pl
/usr/lib/majordomo/bounce-remind
/usr/lib/majordomo/config-test
/usr/lib/majordomo/config_parse.pl
/usr/lib/majordomo/digest
/usr/lib/majordomo/majordomo
/usr/lib/majordomo/majordomo.pl
/usr/lib/majordomo/majordomo_version.pl
/usr/lib/majordomo/request-answer
/usr/lib/majordomo/resend
/usr/lib/majordomo/sample.cf
/usr/lib/majordomo/shlock.pl
%verify(not mode) %attr(4750,root,daemon) /usr/lib/majordomo/wrapper
%{_mandir}/man1/approve.1.gz
%{_mandir}/man1/bounce-remind.1.gz
%{_mandir}/man1/bounce.1.gz
%{_mandir}/man1/digest.1.gz
%{_mandir}/man1/resend.1.gz
%{_mandir}/man8/majordomo.8.gz
%{_mandir}/man8/wrapper.8.gz
%attr(660,mdom,mdom) /var/lib/majordomo/Log

%changelog -n majordomo
* Mon Jun 26 2006 - ma@suse.de
- Added wrapper.8 manpage (#187356)
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Jun 28 2005 - ro@suse.de
- use BuildRoot
- do not build as root
* Thu Nov 11 2004 - mmj@suse.de
- Correct permissions handling
- Remove old Provides:/Obsoletes: mdomo
* Tue Jan 20 2004 - mmj@suse.de
- Add pam-devel to #nfb
* Mon Jul 28 2003 - mmj@suse.de
- Change chown *.* to *:*
* Sun Jun 15 2003 - mmj@suse.de
- Own all dirs
* Tue May 06 2003 - ma@suse.de
- Rename to majordomo requires 'provide/obsolete mdom' (#26684).
* Tue Jul 09 2002 - mmj@suse.de
- Rename to majordomo.
* Tue Jul 09 2002 - schwab@suse.de
- Create mdomo user and group also before installation.
- Fix missing declaration.
* Mon Jul 08 2002 - mmj@suse.de
- Add the group and user mdomo in the package itself.
* Tue Oct 31 2000 - ma@suse.de
- removed group unsorted
* Tue May 30 2000 - ro@suse.de
- doc relocation
* Thu Mar 02 2000 - ma@suse.de
- use %%{_mandir}
* Fri Jan 21 2000 - ma@suse.de
- update to 1.94.5
  Security and bugfix release, incorporating changes which fix
  problems or correct pressing deficiencies in version 1.94.4.
* Mon Sep 13 1999 - bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Mon Jul 19 1999 - florian@suse.de
- create dirs with 0755 perms and not 0775
- add jurix patches
* Wed Aug 19 1998 - florian@suse.de
- make /etc/majordomo.cf a %%config
* Fri Oct 10 1997 - florian@suse.de
- update to 1.94.4
* Mon Jul 07 1997 - florian@suse.de
- update to 1.94.3
- tmp files are now in /var/lib/majordomo/tmp
- utilities for the sysadm of mailing lists are now in /usr/bin/
* Thu Jan 02 1997 - florian@suse.de
- update to version 1.94
* Thu Jan 02 1997 - florian@suse.de
  configuration file sample.cf is now correct for perl5
  mv /local/majordomo /usr/lib/majordomo
  mv /local/lists /var/lib/majordomo
  more docu in /usr/doc/packages/majordomo
  people updating from 4.2 to 4.3 should change /etc/passwd to have
  the home dir for user mdomo in /usr/lib/majordomo instead of
  /local/majordomo