aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile68
1 files changed, 46 insertions, 22 deletions
diff --git a/Makefile b/Makefile
index 6ccce2a..99c0616 100644
--- a/Makefile
+++ b/Makefile
@@ -4,9 +4,33 @@
# ahmadsamir3891@gmail.com
# wally@mageia.org
-PACKAGE = mageia-xfce-config
-VERSION = `date +%Y%m%d`
+NAME = mageia-xfce-config
+# Versioning scheme uses Xfce version as base. 'Zero' after $(XFCEVERSION)
+# separates our versions from Xfce version. Next part, $(BUILD), identifies
+# sequential release number of the package. Last $(BUGFIX) part is only used
+# when doing a bug fix release for stable Mageia versions and is normally
+# 'zero'.
+#
+# So:
+# * Change $(XFCEVERSION) only when Xfce version changes.
+# * Change $(BUILD) when doing a new release.
+# * Use $(BUGFIX) only when releasing a bug fix release for stable Mageia
+# versions.
+# * Note that numbering goes with following sequence 0,1..9,10,11..99,100,101
+# and so on.
+#
+# Examples of version numbers:
+# * 4.100.1.0 (Initial Xfce 4.10 settings version)
+# * 4.100.5.2 (Second bugfix release for 5th release of Xfce 4.10 settings)
+
+XFCEVERSION = 4.10
+BUILD = 1
+BUGFIX = 0
+
+VERSION = $(XFCEVERSION)0.$(BUILD).$(BUGFIX)
+
+DESTDIR=
prefix=/usr
datadir=$(prefix)/share
sysconfdir=/etc
@@ -32,28 +56,28 @@ install:
install -m 644 data/xfce4/*.rc $(DESTDIR)$(xfceconfdir)/xfce4
install -m 644 data/xfce4/*.xrdb $(DESTDIR)$(xfceconfdir)/xfce4
-cleandist:
- rm -rf $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION).tar.xz
-
-localcopy:
- svn export -q -rBASE . $(PACKAGE)-$(VERSION)
-
-tar: cleandist localcopy
- tar cvaf $(PACKAGE)-$(VERSION).tar.xz $(PACKAGE)-$(VERSION)
- rm -rf $(PACKAGE)-$(VERSION)
-
-tar-git:
- @git archive --prefix=$(PACKAGE)-$(VERSION)/ HEAD | xz > $(PACKAGE)-$(VERSION).tar.xz;
+dist-svn:
+ rm -rf $(NAME)-$(XFCEVERSION)*
+ svn export -q -rBASE . $(NAME)-$(VERSION)
+ find $(NAME)-$(VERSION) -name .svnignore -delete
+ tar cfa ../$(NAME)-$(VERSION).tar.xz $(NAME)-$(VERSION)
+ rm -rf $(NAME)-$(VERSION)
-dist: tar
+dist-git:
+ @git archive --prefix=$(NAME)-$(VERSION)/ HEAD | xz >../$(NAME)-$(VERSION).tar.xz;
-.PHONY: ChangeLog log changelog
+dist:
+ rm -rf ../$(NAME)-$(XFCEVERSION)*.tar*
-log: ChangeLog
+ @if [ -e ".svn" ]; then \
+ $(MAKE) dist-svn; \
+ elif [ -e ".git" ]; then \
+ $(MAKE) dist-git; \
+ else \
+ echo "Unknown SCM (not SVN nor GIT)";\
+ exit 1; \
+ fi;
-changelog: ChangeLog
+ $(info $(NAME)-$(VERSION).tar.xz is ready)
-ChangeLog: ../common/username.xml
- svn2cl --accum --authors ../../soft/common/username.xml
- rm -f *.bak
- svn commit -m "Generated by svn2cl the `LC_TIME=C date '+%d_%b'`" ChangeLog
+.PHONY: ChangeLog