~gmpc-trunk/+junk/gmpc-shout.trunk

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Taylor LeMasurier-Wren
  • Date: 2009-08-09 07:00:16 UTC
  • Revision ID: ripps@ripps-desktop-20090809070016-rz4cunh8pyjqk9ph
Intial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
DEBIAN_NAME             := $(shell dpkg-parsechangelog | sed -n 's/^Source: *\(.*\)$$/\1/ p')
 
3
DEBIAN_VERSION          := $(shell dpkg-parsechangelog | sed -n 's/^Version: *\(.*\)$$/\1/ p')
 
4
DEBIAN_UPSTREAM_VERSION := $(shell echo $(DEBIAN_VERSION) | sed 's/^\(.*\)-[^-]*$$/\1/')
 
5
DEBIAN_REVISION         := $(shell echo $(DEBIAN_VERSION) | sed 's/^.*r\([^-]*\)-.*/\1/')
 
6
 
 
7
include /usr/share/cdbs/1/rules/debhelper.mk
 
8
include /usr/share/cdbs/1/class/autotools.mk
 
9
include /usr/share/cdbs/1/class/makefile.mk
 
10
                            
 
11
DEB_DH_STRIP_ARGS := --dbg-package=gmpc-shout-dbg
 
12
 
 
13
makebuilddir/gmpc-shout::
 
14
        NOCONFIGURE=true ./autogen.sh
 
15
 
 
16
 
 
17
RELEASE:=0.18.95
 
18
DEB_ORIG_URI:=git://repo.or.cz/gmpc-shout.git
 
19
TMP_DIR := tmp-$(shell echo $$$$)
 
20
 
 
21
get-orig-source:
 
22
        rm -rf $(TMP_DIR)
 
23
        mkdir $(TMP_DIR)
 
24
        if [ ! -d $(LOCAL_BRANCH) ]; then git clone $(DEB_ORIG_URI) $(LOCAL_BRANCH); fi
 
25
        cd $(LOCAL_BRANCH) && git pull
 
26
        cp -la $(LOCAL_BRANCH) $(TMP_DIR)/$(DEBIAN_NAME)
 
27
ifneq (,$(DEBIAN_TAG))
 
28
        cd $(TMP_DIR)/$(DEBIAN_NAME) && \
 
29
        git branch $(DEBIAN_TAG) $(DEBIAN_TAG) && \
 
30
        git checkout $(DEBIAN_TAG)
 
31
endif
 
32
        @cd $(TMP_DIR)/$(DEBIAN_NAME) ; \
 
33
        REV=`git log --pretty=format:%cd.%h --date=short -1 | tr -d -` ; \
 
34
        #VERSION=$$VERS~git$$REV ; \
 
35
        VERSION=$(RELEASE)~git$$REV ; \
 
36
        echo VERSION=$$VERSION ; \
 
37
        cd .. ; \
 
38
        mv $(DEBIAN_NAME) $(DEBIAN_NAME)-$$VERSION ; \
 
39
        rm -f ../$(DEBIAN_NAME)_$$VERSION.orig.tar.gz ; \
 
40
        tar zcf ../$(DEBIAN_NAME)_$$VERSION.orig.tar.gz --exclude=.git $(DEBIAN_NAME)-$$VERSION ; \
 
41
        cd .. ; \
 
42
        rm -rf $(TMP_DIR) ; \
 
43
        echo "# Done (created $(DEBIAN_NAME)_$$VERSION.orig.tar.gz)" ; \
 
44
        ls -l $(DEBIAN_NAME)_$$VERSION.orig.tar.gz