diff options
-rw-r--r-- | Makefile | 69 |
1 files changed, 29 insertions, 40 deletions
@@ -1,49 +1,38 @@ -############################################################################# -# Project : Mandriva Linux -# File : Makefile -# Package : rpm-helper -# Author : Frederic Lepied -# Created on : Mon Sep 30 13:20:18 1999 -# Version : $Id$ -# Purpose : rules to manage the files. -############################################################################# - PACKAGE = rpm-helper -VERSION := 0.18 - -FILES = AUTHORS README README.CVS COPYING ChangeLog Makefile \ - $(PACKAGE).spec $(SCRIPTS) $(MACROFILEIN) -SCRIPTS = add-user del-user add-service del-service create-file \ - add-group del-group add-shell del-shell verify-shell \ - add-syslog del-syslog add-webapp del-webapp +VERSION = 0.18.2 +SVNPATH = svn+ssh://svn.mandriva.com/svn/soft/rpm/$(PACKAGE) -LIBDIR=/usr/share/$(PACKAGE) -RPMACROSDIR=/etc/rpm/macros.d +SCRIPT_FILES = add-user del-user add-service del-service create-file \ + add-group del-group add-shell del-shell verify-shell \ + add-syslog del-syslog add-webapp del-webapp \ + get-free-syslog-facility get-password +MACROS_FILES = rpm-helper.macros +FILES = AUTHORS README README.CVS COPYING ChangeLog Makefile \ + $(SCRIPT_FILES) $(MACROS_FILES:=.in) -MACROFILEIN = $(PACKAGE).macros.in -MACROFILE = $(MACROFILEIN:.in=) +pkgdatadir = /usr/share/$(PACKAGE) +rpmmacrosdir = /etc/rpm/macros.d all: - @echo "done" + @echo "use make install or make dist" -clean: - rm -f *~ $(PACKAGE)*.tar.bz2 +install: $(MACROS_FILES) + install -d -m 755 $(DESTDIR)$(pkgdatadir) + cp -p $(SCRIPT_FILES) $(DESTDIR)$(pkgdatadir) + install -d -m 755 $(DESTDIR)$(rpmmacrosdir) + install -m 644 $(MACROS_FILES) $(DESTDIR)/$(rpmmacrosdir) -install: - -mkdir -p $(DESTDIR)$(LIBDIR) - cp -p $(SCRIPTS) $(DESTDIR)$(LIBDIR) - -mkdir -p $(DESTDIR)$(RPMACROSDIR) - cat $(MACROFILEIN) | \ - sed 's,@LIBDIR@,$(LIBDIR),g' > $(DESTDIR)$(RPMACROSDIR)/$(MACROFILE) +rpm-helper.macros: rpm-helper.macros.in + sed -e 's:@pkgdatadir@:$(pkgdatadir):' < $< > $@ -version: - @echo "$(VERSION)-$(RELEASE)" +clean: + rm -f *~ -# rules to build a test rpm +# rules to build a local distribution localdist: cleandist dir localcopy tar -cleandist: +cleandist: clean rm -rf $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION).tar.bz2 dir: @@ -57,13 +46,13 @@ tar: bzip2 -9vf $(PACKAGE)-$(VERSION).tar rm -rf $(PACKAGE)-$(VERSION) -# rules to build a distributable rpm +# rules to build a public distribution -dist: changelog cleandist dir tar +dist: changelog cleandist dir localcopy tar svntag changelog: - svn2cl -o ChangeLog || : + svn2cl --strip-prefix soft/rpm/$(PACKAGE)/trunk -o ChangeLog || : rm -f ChangeLog.bak - svn commit -m "Generated by svn2cl" ChangeLog - -# Makefile ends here + +svntag: + svn cp -m 'version $(VERSION)' $(SVNPATH)/trunk $(SVNPATH)/tags/v$(VERSION) |