nmh-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated


From: David Levine
Subject: [Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 20c00225a5ddc4a1e3bc00f65b9f6ebc5486d950
Date: Tue, 13 Dec 2011 03:38:25 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The nmh Mail Handling System".

The branch, master has been updated
       via  20c00225a5ddc4a1e3bc00f65b9f6ebc5486d950 (commit)
       via  d7f717307ce81d8372f00cf3b11cb54a81cc5337 (commit)
      from  bc20acd6c385612fd19bc3ce40f56c32983748f1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=20c00225a5ddc4a1e3bc00f65b9f6ebc5486d950


commit 20c00225a5ddc4a1e3bc00f65b9f6ebc5486d950
Merge: d7f7173 bc20acd
Author: David Levine <address@hidden>
Date:   Mon Dec 12 21:37:47 2011 -0600

    Merge branch 'master' of git.sv.nongnu.org:/srv/git/nmh


http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=d7f717307ce81d8372f00cf3b11cb54a81cc5337


commit d7f717307ce81d8372f00cf3b11cb54a81cc5337
Author: David Levine <address@hidden>
Date:   Mon Dec 12 21:35:52 2011 -0600

    Moved version number from nmh.spec to Makefile.in, to minimize
    maintenance for nmh.spec.

diff --git a/Makefile.in b/Makefile.in
index a3ef699..c1060ea 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -196,12 +196,18 @@ nmhrelease:
        cd $(ftpdir) && ln -s $(tarfile) nmh.tar.gz
        cd $(ftpdir) && md5sum *.gz > MD5SUM
 
-# Create binary and source RPMs.  Be care if using any existing build
-# (make) products:  it's usually a good idea to run make realclean first.
+# Create binary and source RPMs.  Assumes that configure had already
+# been run.  Otherwise, there wouldn't be a Makefile.
 # _topdir puts build area in the RPM/ directory below the current one.
 # _tmppath uses the specified local TMP.
+# srcdir is this current, top level nmh directory.
+# tarfile and version are as specified in this file.  rpmbuild does
+#   not allow Version to contain any dashes.
 rpm: all nmhdist
        @rpmbuild --define '_topdir $(shell pwd)/RPM' \
           --define '_tmppath %{_topdir}/TMP' \
           --define 'srcdir $(shell pwd)' \
+          --define 'tarfile $(tarfile)' \
+          --define 'version $(shell echo $(VERSION) | sed "s/-/_/g")' \
           -ba nmh.spec
+       @$(RM) $(tarfile)
diff --git a/nmh.spec b/nmh.spec
index b736dc8..858db2b 100644
--- a/nmh.spec
+++ b/nmh.spec
@@ -1,17 +1,24 @@
-# Assumes that rpmbuild was invoked main nmh directory using "make rpm".
-# "make rpm" uses an RPM directory below the current directory.
+# Assumes that rpmbuild was invoked in main nmh directory using "make
+# rpm".  Therefore, configure must already have been run.  "make rpm"
+# uses an RPM directory below the current directory.
+#
+# This file is intended to be zero maintenance, that's why it relies
+# on the Makefile (and specifically on the nmhdist target).  If you
+# really want to start with rpmbuild from a clean distribution, look
+# at the rpm target in the main Makefile.in to see what it does.
+#
 # Note that Version cannot contain any dashes.
 
 Name:        nmh
-Version:     1.4.dev
-Release:     1%{?dist}
+Version:     %version
+Release:     0%{?dist}
 Summary:     A capable mail handling system with a command line interface.
-
 Group:       Applications/Internet
 License:     BSD
 URL:         http://savannah.nongnu.org/projects/nmh
-Source0:     nmh-1.4-dev.tar.gz
-BuildRoot:   %{_tmppath}/%{name}-%{version}-%{release}-build
+Source:      %tarfile
+# This should already be defined in /usr/lib/rpm/macros:
+# BuildRoot:   %{_buildrootdir}/%{name}-%{version}-%{release}.%{_arch}
 
 %description
 Nmh is an email system based on the MH email system and is intended to
@@ -25,7 +32,8 @@ email user agent, you'll want to also install exmh to provide 
a user
 interface for it--nmh only has a command line interface.
 
 %prep
-cp -p %{srcdir}/nmh-1.4-dev.tar.gz $RPM_SOURCE_DIR
+#### The tarfile is only needed for the source rpm.
+cp -p %srcdir/%tarfile $RPM_SOURCE_DIR
 
 
 %build
@@ -33,32 +41,24 @@ cp -p %{srcdir}/nmh-1.4-dev.tar.gz $RPM_SOURCE_DIR
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
-#### Assumes that configure was run with --prefix=/usr, at least.
-#### The directory placements need to be cleaned up.
-(cd %{srcdir}  &&  \
- make install DESTDIR=$RPM_BUILD_ROOT SETGID_MAIL=)
-
-#### Not sure why .gz needs to be appended to man file names here.
-#### But without it, the man files don't show the .gz extension:
-find $RPM_BUILD_ROOT ! -type d -print | sed "s#^$RPM_BUILD_ROOT##g" > files
+(cd %srcdir  &&  make install DESTDIR=$RPM_BUILD_ROOT SETGID_MAIL=)
+find $RPM_BUILD_ROOT ! -type d -print | sed "s#^$RPM_BUILD_ROOT##g" > nmh_files
 
 #### Should do the following with an install target in docs/Makefile.
-#### Note that these are excluded from files above because they're
-#### added with doc's in the %files section below.
+#### These are excluded from nmh_files above because they're added
+#### with doc's in the %files section below.
 mkdir -p docs
-cp -p %{srcdir}/VERSION %{srcdir}/COPYRIGHT .
+cp -p %srcdir/VERSION %srcdir/COPYRIGHT .
 for i in COMPLETION-* DIFFERENCES FAQ MAIL.FILTERING README* TODO; do
-  cp -p %{srcdir}/docs/$i docs
+  cp -p %srcdir/docs/$i docs
 done
 
 
 %clean
-rm -rf files $RPM_BUILD_ROOT docs COPYRIGHT VERSION
+rm -rf $RPM_BUILD_ROOT $RPM_SOURCE_DIR/%tarfile nmh_files docs COPYRIGHT 
VERSION
 
 
-%files -f files
+%files -f nmh_files
 %defattr(-,root,root,-)
-%doc COPYRIGHT VERSION
 %doc docs/COMPLETION-* docs/DIFFERENCES docs/FAQ docs/MAIL.FILTERING
-%doc docs/README* docs/TODO
+%doc docs/README* docs/TODO COPYRIGHT VERSION

-----------------------------------------------------------------------

Summary of changes:
 Makefile.in |   10 ++++++++--
 nmh.spec    |   50 +++++++++++++++++++++++++-------------------------
 2 files changed, 33 insertions(+), 27 deletions(-)


hooks/post-receive
-- 
The nmh Mail Handling System



reply via email to

[Prev in Thread] Current Thread [Next in Thread]