aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGuillaume Rousse <guillomovitch@mandriva.org>2007-03-05 11:56:17 +0000
committerGuillaume Rousse <guillomovitch@mandriva.org>2007-03-05 11:56:17 +0000
commitf603cf1d47b19c2cdf7ef3b62ef828c34714fa1b (patch)
tree99502553006c9d25de11f87dcbba37f42f1752c1 /Makefile
parent9dfb640219ce20dac7c16f2c3e758bdde891bd8f (diff)
downloadspec-helper-f603cf1d47b19c2cdf7ef3b62ef828c34714fa1b.tar
spec-helper-f603cf1d47b19c2cdf7ef3b62ef828c34714fa1b.tar.gz
spec-helper-f603cf1d47b19c2cdf7ef3b62ef828c34714fa1b.tar.bz2
spec-helper-f603cf1d47b19c2cdf7ef3b62ef828c34714fa1b.tar.xz
spec-helper-f603cf1d47b19c2cdf7ef3b62ef828c34714fa1b.zip
cleanup makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile75
1 files changed, 33 insertions, 42 deletions
diff --git a/Makefile b/Makefile
index 60be557..aad1a3f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,41 +1,37 @@
-#---------------------------------------------------------------
-# Project : Mandriva Linux
-# Module : spec-helper
-# File : Makefile
-# Version : $Revision$
-# Author : $Author$
-# Created On : $Date$
-#---------------------------------------------------------------
-
-PACKAGE=spec-helper
-VERSION:=$(shell rpm --qf %{VERSION} -q --specfile spec-helper.spec)
-
-FILES=spec-helper clean_files clean_perl compress_files strip_files lib_symlinks gprintify.py fix-mo translate_menu.pl \
- fixpamd gprintify remove_info_dir relink_symlinks
-MACROSFILE = $(PACKAGE).macros
-DISTFILES= AUTHORS Makefile ChangeLog Howto-spec-helper $(FILES) macroszification spec-helper.spec $(MACROSFILE).in
-bindir=/usr/bin
-
-spec_helper_dir=/usr/share/spec-helper
-rpmmacrosdir=/etc/rpm
+PACKAGE = spec-helper
+VERSION = 0.24
+SVNPATH = svn+ssh://svn.mandriva.com/svn/soft/rpm/$(PACKAGE)
+
+SCRIPT_FILES = spec-helper clean_files clean_perl compress_files strip_files \
+ lib_symlinks gprintify.py fix-mo translate_menu.pl \
+ fixpamd gprintify remove_info_dir relink_symlinks
+BIN_FILES = macroszification
+MACROS_FILES = spec-helper.macros
+FILES = AUTHORS Makefile ChangeLog Howto-spec-helper \
+ $(SCRIPT_FILES) $(BIN_FILES) $(MACROS_FILES:=.in)
+
+bindir = /usr/bin
+pkgdatadir = /usr/share/$(PACKAGE)
+rpmmacrosdir = /etc/rpm/macros.d
all:
@echo "use make install or make dist"
-install: $(MACROSFILE)
- install -d -m755 $(DESTDIR)$(bindir)
- install -m755 macroszification $(DESTDIR)$(bindir)/
- install -d -m 755 $(DESTDIR)$(spec_helper_dir)
- install -m 755 $(FILES) $(DESTDIR)$(spec_helper_dir)
+install: $(MACROS_FILES)
+ install -d -m 755 $(DESTDIR)$(bindir)
+ install -m 755 $(BIN_FILES) $(DESTDIR)$(bindir)
+ install -d -m 755 $(DESTDIR)$(pkgdatadir)
+ install -m 755 $(SCRIPTS) $(DESTDIR)$(pkgdatadir)
install -d -m 755 $(DESTDIR)/$(rpmmacrosdir)
- install -m 644 $(MACROSFILE) $(DESTDIR)/$(rpmmacrosdir)
+ install -m 644 $(MACROS_FILES) $(DESTDIR)/$(rpmmacrosdir)
-clean:
- find . -name '*~' | xargs rm -f
+spec-helper.macros: spec-helper.macros.in
+ sed -e 's:@SPEC_HELPER_ROOT@:$(pkgdatadir):' < $< > $@
-# rules to build a test rpm
+clean:
+ rm -f *~
-localrpm: localdist buildrpm
+# rules to build a local distribution
localdist: cleandist dir localcopy tar
@@ -46,25 +42,20 @@ dir:
mkdir $(PACKAGE)-$(VERSION)
localcopy:
- ln $(DISTFILES) $(PACKAGE)-$(VERSION)
+ tar c $(FILES) | tar x -C $(PACKAGE)-$(VERSION)
tar:
tar cvf $(PACKAGE)-$(VERSION).tar $(PACKAGE)-$(VERSION)
bzip2 -9vf $(PACKAGE)-$(VERSION).tar
rm -rf $(PACKAGE)-$(VERSION)
-spec-helper.macros: spec-helper.macros.in
- cat $< | sed -e 's:@SPEC_HELPER_ROOT@:$(spec_helper_dir):' > $@
-
-buildrpm:
- rpm -ta $(PACKAGE)-$(VERSION).tar.bz2
-
-# rules to build a distributable rpm
+# rules to build a public distribution
-rpm: changelog localdist buildrpm
-
-dist: cleandist dir localcopy tar
+dist: changelog cleandist dir localcopy tar svntag
changelog:
- svn2cl --accum --strip-prefix=soft/rpm/spec-helper/trunk
+ svn2cl -o ChangeLog || :
rm -f ChangeLog.bak
+
+svntag:
+ svn cp -m 'version $(VERSION)' $(SVNPATH)/trunk $(SVNPATH)/tags/v$(VERSION)