Added --with-rpmdir configure option so that user can set location of RPM build root.
[mmh] / nmh.spec
1 # Assumes that rpmbuild was invoked in main nmh directory using "make
2 # rpm".  Therefore, configure must already have been run.
3 #
4 # This file is intended to be zero maintenance, that's why it relies
5 # on the Makefile (and specifically on the nmhdist target).  If you
6 # really want to start with rpmbuild from a clean distribution, you'll
7 # need to first run configure, make, and make nmhdist.
8 #
9 # Note that Version cannot contain any dashes.
10 #
11 # The description, summary, and a few other tags were taken from the
12 # nmh.spec used to build the Fedora 15 nmh rpm.
13
14 Name:        nmh
15 Version:     %version
16 Release:     0%{?dist}
17 Summary:     A capable mail handling system with a command line interface.
18 Group:       Applications/Internet
19 License:     BSD
20 URL:         http://savannah.nongnu.org/projects/nmh
21 Source:      %tarfile
22 # This should already be defined in /usr/lib/rpm/macros:
23 # BuildRoot:   %{_buildrootdir}/%{name}-%{version}-%{release}.%{_arch}
24
25 %description
26 Nmh is an email system based on the MH email system and is intended to
27 be a (mostly) compatible drop-in replacement for MH.  Nmh isn't a
28 single comprehensive program.  Instead, it consists of a number of
29 fairly simple single-purpose programs for sending, receiving, saving,
30 retrieving and otherwise manipulating email messages.  You can freely
31 intersperse nmh commands with other shell commands or write custom
32 scripts which utilize nmh commands.  If you want to use nmh as a true
33 email user agent, you'll want to also install exmh to provide a user
34 interface for it--nmh only has a command line interface.
35
36
37 %prep
38 #### The tarfile is only needed for the source rpm.
39 cp -p %srcdir/%tarfile $RPM_SOURCE_DIR
40
41
42 %build
43
44
45 %install
46 rm -rf $RPM_BUILD_ROOT doc
47 (cd %srcdir  &&  make install DESTDIR=$RPM_BUILD_ROOT SETGID_MAIL=)
48 #### Exclude docs from nmh_files because its files are added with the
49 #### %doc directive in the %files section below.
50 mv `find $RPM_BUILD_ROOT -type d -name doc` .
51 find $RPM_BUILD_ROOT ! -type d -print | sed "s#^$RPM_BUILD_ROOT##" > nmh_files
52
53
54 %clean
55 rm -rf $RPM_BUILD_ROOT doc $RPM_SOURCE_DIR/%tarfile nmh_files
56
57
58 %files -f nmh_files
59 %defattr(-,root,root,-)
60 %doc doc/*