Added first cut at nmh.spec, along with rpm: target in Makefile.in.
[mmh] / nmh.spec
1 # Assumes that rpmbuild was invoked main nmh directory using "make rpm".
2 # "make rpm" uses an RPM directory below the current directory.
3 # Note that Version cannot contain any dashes.
4
5 Name:        nmh
6 Version:     1.4.dev
7 Release:     1%{?dist}
8 Summary:     A capable mail handling system with a command line interface.
9
10 Group:       Applications/Internet
11 License:     BSD
12 URL:         http://savannah.nongnu.org/projects/nmh
13 Source0:     nmh-1.4-dev.tar.gz
14 BuildRoot:   %{_tmppath}/%{name}-%{version}-%{release}-build
15
16 %description
17 Nmh is an email system based on the MH email system and is intended to
18 be a (mostly) compatible drop-in replacement for MH.  Nmh isn't a
19 single comprehensive program.  Instead, it consists of a number of
20 fairly simple single-purpose programs for sending, receiving, saving,
21 retrieving and otherwise manipulating email messages.  You can freely
22 intersperse nmh commands with other shell commands or write custom
23 scripts which utilize nmh commands.  If you want to use nmh as a true
24 email user agent, you'll want to also install exmh to provide a user
25 interface for it--nmh only has a command line interface.
26
27 %prep
28 cp -p %{srcdir}/nmh-1.4-dev.tar.gz $RPM_SOURCE_DIR
29
30
31 %build
32
33
34 %install
35 rm -rf $RPM_BUILD_ROOT
36
37 #### Assumes that configure was run with --prefix=/usr, at least.
38 #### The directory placements need to be cleaned up.
39 (cd %{srcdir}  &&  \
40  make install DESTDIR=$RPM_BUILD_ROOT SETGID_MAIL=)
41
42 #### Not sure why .gz needs to be appended to man file names here.
43 #### But without it, the man files don't show the .gz extension:
44 find $RPM_BUILD_ROOT ! -type d -print | sed "s#^$RPM_BUILD_ROOT##g" > files
45
46 #### Should do the following with an install target in docs/Makefile.
47 #### Note that these are excluded from files above because they're
48 #### added with doc's in the %files section below.
49 mkdir -p docs
50 cp -p %{srcdir}/VERSION %{srcdir}/COPYRIGHT .
51 for i in COMPLETION-* DIFFERENCES FAQ MAIL.FILTERING README* TODO; do
52   cp -p %{srcdir}/docs/$i docs
53 done
54
55
56 %clean
57 rm -rf files $RPM_BUILD_ROOT docs COPYRIGHT VERSION
58
59
60 %files -f files
61 %defattr(-,root,root,-)
62 %doc COPYRIGHT VERSION
63 %doc docs/COMPLETION-* docs/DIFFERENCES docs/FAQ docs/MAIL.FILTERING
64 %doc docs/README* docs/TODO