Makefile cleanups, change initial version to 0.1
authorJeremy Kerr <jk@ozlabs.org>
Tue, 21 Nov 2006 03:56:27 +0000 (14:56 +1100)
committerJeremy Kerr <jk@ozlabs.org>
Thu, 12 Nov 2009 23:58:43 +0000 (10:58 +1100)
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Makefile
debian/changelog
debian/rules

index 0d4b755a507a82ab9ed6e0d7efd4f0cd919af2d2..9ce6144a3a64559f3ad4b00182e968174fa62cd1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,28 +1,42 @@
-INSTALLDIR=/usr/bin
-VERSION="0.0.1"
-SOURCES=bitfield bitfield-completions.sh bitfield.vim Makefile
-DEBSOURCES=bitfield.install bitfield-data.install changelog control rules
-CONFS=cell.conf powerpc.conf
+package=bitfield
+version=0.1
+pkg_ver=$(package)-$(version)
 
 
-all: 
+prefix=/usr/local
+bindir=$(prefix)/bin
+sysconfdir=$(prefix)/etc
+sharedir=$(prefix)/share
+
+sources=bitfield bitfield-completions.sh bitfield.vim Makefile
+deb_meta=bitfield.install bitfield-data.install changelog control rules
+configs=cell.conf powerpc.conf
+
+all:
+
+install:
+       install -d $(DESTDIR)$(bindir)
+       install -d $(DESTDIR)$(sysconfdir)/bash_completion.d
+       install -d $(DESTDIR)$(sharedir)/vim/addons/syntax
+       install -d $(DESTDIR)$(sysconfdir)/bitfield.d
+       install -m 755 -t $(DESTDIR)$(bindir) bitfield
+       install -m 644 -D bitfield-completions.sh \
+               $(DESTDIR)$(sysconfdir)/bash_completion.d/bitfield
+       install -m 644 -t $(DESTDIR)$(sharedir)/vim/addons/syntax bitfield.vim
+       install -m 644 -t $(DESTDIR)$(sysconfdir)/bitfield.d \
+               $(foreach f,$(configs),conf/$(f))
 
 clean:
 
 clean:
-       rm -rf bitfield-${VERSION}
-
-install: 
-       install -d ${DESTDIR}${INSTALLDIR}
-       install -d ${DESTDIR}/etc/bash_completion.d
-       install -d ${DESTDIR}/usr/share/vim/addons/syntax
-       install -d ${DESTDIR}/etc/bitfield.d
-       install -m 755 -t ${DESTDIR}${INSTALLDIR} bitfield 
-       install -m 644 -D bitfield-completions.sh ${DESTDIR}/etc/bash_completion.d/bitfield
-       install -m 644 -t ${DESTDIR}/usr/share/vim/addons/syntax bitfield.vim
-       install -m 644 -t ${DESTDIR}/etc/bitfield.d $(foreach f,$(CONFS),conf/$(f))
-
-dist: clean
-       mkdir -p bitfield-${VERSION}/debian
-       mkdir -p bitfield-${VERSION}/conf
-       cp -a ${SOURCES} bitfield-${VERSION}
-       cp -a $(foreach f,$(DEBSOURCES),debian/$(f)) bitfield-${VERSION}/debian
-       cp -a $(foreach f,$(CONFS),conf/$(f)) bitfield-${VERSION}/conf
-       tar zcvf bitfield-${VERSION}.tar.gz bitfield-${VERSION}
+
+distclean: clean
+       rm -rf $(pkg_ver)
+
+dist: $(pkg_ver).tar.gz
+
+$(pkg_ver).tar.gz: $(pkg_ver)
+       tar zcvf $@ $^
+
+$(pkg_ver): clean
+       mkdir -p $@ $@/debian $@/conf
+       cp -a $(sources) $@
+       cp -a $(foreach f,$(deb_meta),debian/$(f)) $@/debian
+       cp -a $(foreach f,$(configs),conf/$(f)) $@/conf
index a8ab32721e3b639cb62d6149a4665808fc9ee7b7..0d0db0c0cd134f5967ba0e630a7165184fb56d2e 100644 (file)
@@ -1,4 +1,4 @@
-bitfield (0.0.1-1) unstable; urgency=low
+bitfield (0.1-1) unstable; urgency=low
 
   * Initial release (Closes: #nnnn)  <nnnn is the bug number of your ITP>
 
 
   * Initial release (Closes: #nnnn)  <nnnn is the bug number of your ITP>
 
index d81c5cefd6c63012d24796caadf7b6fe8be77b9b..c0f4662b1887292539a72b4ffe23c3dce7a68d98 100644 (file)
@@ -3,11 +3,6 @@
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/makefile.mk
 
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/makefile.mk
 
-#DEB_MAKE_CLEAN_TARGET   = clean
-#DEB_MAKE_BUILD_TARGET   = all
-DEB_MAKE_INSTALL_TARGET = install DESTDIR=$(CURDIR)/debian/tmp/
-# no check for this software
+DEB_MAKE_INSTALL_TARGET = install prefix=/usr DESTDIR=$(CURDIR)/debian/tmp/
 DEB_MAKE_CHECK_TARGET   =
 
 DEB_MAKE_CHECK_TARGET   =
 
-# example when changing environment variables is necessary
-#DEB_MAKE_ENVVARS        = CFLAGS="-pwet"