Re: spec file

Boris Goldowsky <boris-FrUbXkNCsVf2fBVCVOL8/[email protected]> Mon, 12 Jan 2004 10:53:27 -0500
Newsgroups gmane.comp.sysutils.backup.hdup.general
Message-ID <[email protected]>
OK, I got an RPM for 1.6.24 built.  Some notes and a patch:

* There are three hdup.conf files shipped in the tarball. I think you
should remove the ones in contrib/ and examples/  since they are not up
to date.

* Did the autom4te.cache directory slip into the tarball by mistake?

* The default location for the hdup.spec file would be in the top-level
directory of the tarball, but rpmbuild seems to find it in contrib
anyway.

The patch includes the following changes:

* Updates documentation in INSTALL (the config file IS installed by
default, I believe)

* Edit Makefile.in -- rename etcdir to sysconfdir and bindir to sbindir
for simplicity, since that's what configure calls them and what rpm
expects.

* Edit hdup.spec -- update version number.  I guess this will need to be
updated with each release.  Also remove redundant install of hdup.conf
since regular make install does this.

Hoping these changes can go into the next version.

Bng
hdup-patch (text/x-patch, 2.6 KB)
diff -ur hdup16.orig/contrib/hdup.spec hdup16/contrib/hdup.spec
--- hdup16.orig/contrib/hdup.spec	2003-06-19 05:48:51.000000000 -0400
+++ hdup16/contrib/hdup.spec	2003-06-19 05:48:51.000000000 -0400
@@ -1,6 +1,6 @@
 Summary: hdup - Backup program
 Name: hdup
-Version: 1.6.17
+Version: 1.6.24
 Release: 2
 
 Group: Applications/Archiving
@@ -33,8 +33,6 @@
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT/usr/sbin 
 %makeinstall bindir=$RPM_BUILD_ROOT/usr/sbin
-install -d $RPM_BUILD_ROOT/etc/hdup # needs example conf ?
-> $RPM_BUILD_ROOT/etc/hdup/hdup.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
--- hdup16.orig/INSTALL	2003-04-28 12:45:23.000000000 -0400
+++ hdup16/INSTALL	2003-04-28 12:45:23.000000000 -0400
@@ -2,9 +2,9 @@
 
  ./configure && make install
 
-Hdup's configuration file is not installed by default. See examples/ for an
-example configuration. hdup.conf(5) will also give you information. The default
-directory for the configuration file is /etc/hdup.
+Hdup's default configuration file is installed in /etc/hdup/hdup.conf.
+For more information on the configuration file format, see the man
+page for hdup.conf (5).
 
 Also see doc/ for more information on the usage of hdup. Or check out
 http://www.miek.nl/projects/hdup16/ for more information.
diff -ur hdup16.orig/src/Makefile.in hdup16/src/Makefile.in
--- hdup16.orig/src/Makefile.in	2003-06-08 12:04:28.000000000 -0400
+++ hdup16/src/Makefile.in	2003-06-08 12:04:28.000000000 -0400
@@ -10,9 +10,9 @@
 
 prefix  = @prefix@
 exec_prefix = @exec_prefix@
-bindir = @sbindir@
+sbindir = @sbindir@
 mandir = @mandir@
-etcdir = /etc/hdup
+sysconfdir = @sysconfdir@
 
 ######################################
 
@@ -54,19 +54,18 @@
 uninstall:
 	@echo -n "Uninstalling hdup..."
 	@rm -f ${bindir}/hdup
-	#@rm -f ${etcdir}/hdup.conf
-	@rmdir --ignore-fail-on-non-empty ${etcdir}
+	@rmdir --ignore-fail-on-non-empty ${sysconfdir}
 	@rm -f ${mandir}/man1/hdup.1
 	@rm -f ${mandir}/man5/hdup.conf.5
 	@echo "done"
 
 install: hdup ../hdup.conf ../doc/hdup.1 ../doc/hdup.conf.5
-	@echo "Installing in hdup in ${bindir}..."
-	@mkdir -p ${etcdir}
+	@echo "Installing in hdup in ${sbindir}..."
+	@mkdir -p ${sysconfdir}/hdup
 	@mkdir -p ${mandir}/man1
 	@mkdir -p ${mandir}/man5
-	@[ -f ${etcdir}/hdup.conf ] || ${INSTALL} -m 600 ../hdup.conf ${etcdir}/hdup.conf
-	@${INSTALL} hdup ${bindir}/hdup
+	@[ -f ${sysconfdir}/hdup/hdup.conf ] || ${INSTALL} -m 600 ../hdup.conf ${sysconfdir}/hdup/hdup.conf
+	@${INSTALL} hdup ${sbindir}/hdup
 	@${INSTALL} ../doc/hdup.1 ${mandir}/man1/hdup.1
 	@${INSTALL} ../doc/hdup.conf.5 ${mandir}/man5/hdup.conf.5
 	@echo "done"