File majordomo.spec of Package majordomo.import5145

#
# spec file for package majordomo
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           majordomo
BuildRequires:  pam-devel
Url:            http://www.greatcircle.com/majordomo/
License:        individual distribution permission.
Group:          Productivity/Networking/Email/Mailinglists
Summary:        Mailing List Software
AutoReqProv:    on
Version:        1.94.5
Release:        464.<RELEASE465>
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
Patch4:         majordomo-%{version}.fix-split-no-longer-assigning-to-_-bnc-716393.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
%patch0
%patch1
%patch2
%patch3
%patch4 -p1

%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