]>
Commit | Line | Data |
---|---|---|
5ee4581b JR |
1 | Summary: A capable mail handling system with a command line interface. |
2 | Name: nmh | |
3 | Provides: mh | |
4 | Version: 0.27 | |
5 | Release: 9 | |
6 | Copyright: freeware | |
7 | Group: Applications/Mail | |
8 | Source: ftp://ftp.math.gatech.edu/pub/nmh/%{name}-%{version}.tar.gz | |
9 | Patch0: nmh-0.24-config.patch | |
10 | Patch1: nmh-0.27-buildroot.patch | |
11 | Patch2: nmh-0.27-security.patch | |
12 | Patch3: nmh-0.27-compat21.patch | |
13 | Requires: smtpdaemon | |
14 | Obsoletes: mh | |
15 | Buildroot: /tmp/%{name}-%{version}-root | |
28c19b9e JR |
16 | |
17 | %description | |
18 | Nmh is an email system based on the MH email system and is intended | |
19 | to be a (mostly) compatible drop-in replacement for MH. Nmh isn't | |
20 | a single comprehensive program. Instead, it consists of a number | |
21 | of fairly simple single-purpose programs for sending, receiving, | |
22 | saving, retrieving and otherwise manipulating email messages. You | |
23 | can freely intersperse nmh commands with other shell commands or | |
24 | write custom scripts which utilize nmh commands. If you want to use | |
25 | nmh as a true email user agent, you'll want to also install exmh to | |
26 | provide a user interface for it--nmh only has a command line interface. | |
27 | ||
28 | If you'd like to use nmh commands in shell scripts, or if you'd like to | |
29 | use nmh and exmh together as your email user agent, you should install | |
30 | nmh. | |
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 |
40 | LIBS=-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 | |
49 | make | |
50 | ||
51 | %install | |
5ee4581b | 52 | make install DESTDIR=$RPM_BUILD_ROOT |
28c19b9e | 53 | |
5ee4581b JR |
54 | rm -f $RPM_BUILD_ROOT/etc/nmh/*.old |
55 | ||
56 | strip --strip-unneeded $RPM_BUILD_ROOT%{_bindir}/* || : | |
57 | ||
58 | gzip -9nf COPYRIGHT DIFFERENCES FAQ MAIL.FILTERING README TODO VERSION \ | |
59 | ZSH.COMPLETION $RPM_BUILD_ROOT%{_mandir}/*/* | |
28c19b9e JR |
60 | |
61 | %clean | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
64 | %post | |
5ee4581b JR |
65 | if [ ! -d %{_bindir}/mh -a ! -L %{_bindir}/mh ] ; then |
66 | ln -s . %{_bindir}/mh | |
28c19b9e | 67 | fi |
5ee4581b JR |
68 | if [ ! -d %{_libdir}/mh -a ! -L %{_libdir}/mh ] ; then |
69 | ln -s nmh %{_libdir}/mh | |
28c19b9e JR |
70 | fi |
71 | ||
72 | %triggerpostun -- mh, nmh <= 0.27-7 | |
5ee4581b JR |
73 | if [ ! -d %{_bindir}/mh -a ! -L %{_bindir}/mh ] ; then |
74 | ln -s . %{_bindir}/mh | |
28c19b9e | 75 | fi |
5ee4581b JR |
76 | if [ ! -d %{_libdir}/mh -a ! -L %{_libdir}/mh ] ; then |
77 | ln -s nmh %{_libdir}/mh | |
28c19b9e JR |
78 | fi |
79 | ||
80 | %preun | |
81 | if [ $1 = 0 ]; then | |
5ee4581b JR |
82 | [ ! -L %{_bindir}/mh ] || rm -f %{_bindir}/mh |
83 | [ ! -L %{_libdir}/mh ] || rm -f %{_libdir}/mh | |
28c19b9e JR |
84 | fi |
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}/*/* |