]> git.pld-linux.org Git - packages/nmh.git/blame - nmh.spec
- cleanup for PLD (FHS 2.0, macros)
[packages/nmh.git] / nmh.spec
CommitLineData
5ee4581b
JR
1Summary: A capable mail handling system with a command line interface.
2Name: nmh
3Provides: mh
4Version: 0.27
5Release: 9
6Copyright: freeware
7Group: Applications/Mail
8Source: ftp://ftp.math.gatech.edu/pub/nmh/%{name}-%{version}.tar.gz
9Patch0: nmh-0.24-config.patch
10Patch1: nmh-0.27-buildroot.patch
11Patch2: nmh-0.27-security.patch
12Patch3: nmh-0.27-compat21.patch
13Requires: smtpdaemon
14Obsoletes: mh
15Buildroot: /tmp/%{name}-%{version}-root
28c19b9e
JR
16
17%description
18Nmh is an email system based on the MH email system and is intended
19to be a (mostly) compatible drop-in replacement for MH. Nmh isn't
20a single comprehensive program. Instead, it consists of a number
21of fairly simple single-purpose programs for sending, receiving,
22saving, retrieving and otherwise manipulating email messages. You
23can freely intersperse nmh commands with other shell commands or
24write custom scripts which utilize nmh commands. If you want to use
25nmh as a true email user agent, you'll want to also install exmh to
26provide a user interface for it--nmh only has a command line interface.
27
28If you'd like to use nmh commands in shell scripts, or if you'd like to
29use nmh and exmh together as your email user agent, you should install
30nmh.
31
32%prep
33%setup -q
5ee4581b
JR
34%patch0 -p1
35%patch1 -p1
36%patch2 -p1
37%patch3 -p1
28c19b9e
JR
38
39%build
5ee4581b
JR
40LIBS=-lgdbm CFLAGS="$RPM_OPT_FLAGS" ./configure \
41 --prefix=%{_prefix} \
42 --exec-prefix=%{_prefix} \
43 --bindir=%{_bindir} \
44 --mandir=%{_mandir} \
45 --libdir=%{_libdir}/nmh \
46 --sysconfdir=/etc/nmh \
47 --with-editor=/bin/vi
28c19b9e
JR
48
49make
50
51%install
5ee4581b 52make install DESTDIR=$RPM_BUILD_ROOT
28c19b9e 53
5ee4581b
JR
54rm -f $RPM_BUILD_ROOT/etc/nmh/*.old
55
56strip --strip-unneeded $RPM_BUILD_ROOT%{_bindir}/* || :
57
58gzip -9nf COPYRIGHT DIFFERENCES FAQ MAIL.FILTERING README TODO VERSION \
59 ZSH.COMPLETION $RPM_BUILD_ROOT%{_mandir}/*/*
28c19b9e
JR
60
61%clean
62rm -rf $RPM_BUILD_ROOT
63
64%post
5ee4581b
JR
65if [ ! -d %{_bindir}/mh -a ! -L %{_bindir}/mh ] ; then
66 ln -s . %{_bindir}/mh
28c19b9e 67fi
5ee4581b
JR
68if [ ! -d %{_libdir}/mh -a ! -L %{_libdir}/mh ] ; then
69 ln -s nmh %{_libdir}/mh
28c19b9e
JR
70fi
71
72%triggerpostun -- mh, nmh <= 0.27-7
5ee4581b
JR
73if [ ! -d %{_bindir}/mh -a ! -L %{_bindir}/mh ] ; then
74 ln -s . %{_bindir}/mh
28c19b9e 75fi
5ee4581b
JR
76if [ ! -d %{_libdir}/mh -a ! -L %{_libdir}/mh ] ; then
77 ln -s nmh %{_libdir}/mh
28c19b9e
JR
78fi
79
80%preun
81if [ $1 = 0 ]; then
5ee4581b
JR
82 [ ! -L %{_bindir}/mh ] || rm -f %{_bindir}/mh
83 [ ! -L %{_libdir}/mh ] || rm -f %{_libdir}/mh
28c19b9e
JR
84fi
85
86%files
5ee4581b
JR
87%defattr(644,root,root,755)
88%doc {COPYRIGHT,DIFFERENCES,FAQ,MAIL.FILTERING,README}.gz
89%doc {TODO,VERSION,ZSH.COMPLETION}.gz
90%dir %{_libdir}/nmh
28c19b9e
JR
91%dir /etc/nmh
92%config /etc/nmh/*
5ee4581b
JR
93%attr(755,root,root) %{_bindir}/*
94%attr(755,root,root) %{_libdir}/nmh/*
95%{_mandir}/*/*
This page took 0.041358 seconds and 4 git commands to generate.