aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJani Välimaa <wally@mageia.org>2013-07-27 19:20:07 +0000
committerJani Välimaa <wally@mageia.org>2013-07-27 19:20:07 +0000
commit07b24ad95237587d6ea8e905f38ceff4ba186db1 (patch)
tree0e28cfdd51e16e07a8c27a5f8161f6ee1b64b0c1 /Makefile
parenta26fa86423e3907671d79828d1c18afc241f51d4 (diff)
downloadconfig-07b24ad95237587d6ea8e905f38ceff4ba186db1.tar
config-07b24ad95237587d6ea8e905f38ceff4ba186db1.tar.gz
config-07b24ad95237587d6ea8e905f38ceff4ba186db1.tar.bz2
config-07b24ad95237587d6ea8e905f38ceff4ba186db1.tar.xz
config-07b24ad95237587d6ea8e905f38ceff4ba186db1.zip
redo Makefile to use some kind of versioning schema and improve tarball creation
Diffstat (limited to 'Makefile')
-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