aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile40
1 files changed, 19 insertions, 21 deletions
diff --git a/Makefile b/Makefile
index 07eee05..3c90a0d 100644
--- a/Makefile
+++ b/Makefile
@@ -8,11 +8,9 @@
#############################################################################
PACKAGE=s2u
-VERSION:=$(shell rpm -q --qf '%{VERSION}\n' --specfile $(PACKAGE).spec | head -1)
-RELEASE:=$(shell rpm -q --qf '%{RELEASE}\n' --specfile $(PACKAGE).spec | head -1| sed -e 's/%mkrel \(.*\)/\1mdv/g')
TAG := $(shell echo "V$(VERSION)_$(RELEASE)" | tr -- '-.' '__')
-FILES = Makefile README hostname-post s2u.c s2u.sh s2u.spec \
+FILES = Makefile README hostname-post s2u.c s2u.sh \
AUTHORS LICENSE README ChangeLog s2u.conf
DEFS = -DDBUS_API_SUBJECT_TO_CHANGE=1
@@ -36,7 +34,7 @@ clean:
install:
install -d $(DESTDIR)/etc/X11/xinit.d
- install s2u.sh $(DESTDIR)/etc/X11/xinit.d
+ install s2u.sh $(DESTDIR)/etc/X11/xinit.d/99s2u
install -d $(DESTDIR)/usr/bin
install s2u $(DESTDIR)/usr/bin
install -d $(DESTDIR)/etc/sysconfig/network-scripts/hostname.d
@@ -45,43 +43,43 @@ install:
install -m 644 s2u.conf $(DESTDIR)/etc/dbus-1/system.d
# rules to build a test rpm
+checktag:
+ @if [ "x$(VERSION)" == "x" -o "x$(RELEASE)" = "x" ]; then \
+ echo usage is "make VERSION=version_number RELEASE=release_number dist" ; \
+ exit 1 ; \
+ fi
-localrpm: localdist buildrpm
localdist: cleandist dir localcopy tar
-cleandist:
+cleandist: checktag
rm -rf $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION).tar.bz2
-dir:
+dir: checktag
mkdir $(PACKAGE)-$(VERSION)
-localcopy:
+localcopy: checktag
tar c $(FILES) | tar x -C $(PACKAGE)-$(VERSION)
-tar:
+tar: checktag
tar cvf $(PACKAGE)-$(VERSION).tar $(PACKAGE)-$(VERSION)
bzip2 -9vf $(PACKAGE)-$(VERSION).tar
rm -rf $(PACKAGE)-$(VERSION)
-buildrpm:
- rpm -ta $(PACKAGE)-$(VERSION).tar.bz2
-
# rules to build a distributable rpm
-rpm: changelog cvstag dist buildrpm
-
-dist: cleandist dir export tar
+dist: checktag cleandist svntag export tar
-export:
- cvs export -d $(PACKAGE)-$(VERSION) -r $(TAG) $(PACKAGE)
+export: checktag
+ svn export $(SVNROOT)/tags/$(TAG) $(PACKAGE)-$(VERSION)
-cvstag:
- cvs tag $(CVSTAGOPT) $(TAG)
+svntag: checktag
+ svn copy $(SVNROOT)/trunk $(SVNROOT)/tags/$(TAG) -m "$(TAG)"
changelog: ../common/username
- cvs2cl -U ../common/username -I ChangeLog
+#svn2cl is available in our contrib.
+ svn2cl --authors ../common/username.xml --accum
rm -f ChangeLog.bak
- cvs commit -m "Generated by cvs2cl the `date '+%d_%b'`" ChangeLog
+ svn commit -m "Generated by svn2cl the `date '+%c'`" ChangeLog
# Makefile ends here