]> git.proxmox.com Git - arch-pacman.git/blob - Makefile
makefile updates
[arch-pacman.git] / Makefile
1 RELEASE=4.2.1
2
3 PACKAGE=arch-pacman
4 PACMANVER=4.2.1
5 DEBREL=1
6
7 SRCDIR=pacman
8 SRCTAR=${SRCDIR}.tgz
9
10 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
11 GITVERSION:=$(shell cat .git/refs/heads/master)
12
13 DEB=${PACKAGE}_${PACMANVER}-${DEBREL}_amd64.deb
14 DEB2=${PACKAGE}-dev_${PACMANVER}-${DEBREL}_amd64.deb \
15 ${PACKAGE}-dbg_${PACMANVER}-${DEBREL}_amd64.deb
16
17 DEBS= ${DEB} ${DEB2}
18
19 all: ${DEBS}
20 echo ${DEBS}
21
22 ${DEB}: ${SRCTAR}
23 rm -rf ${SRCDIR}
24 tar xf ${SRCTAR}
25 cp -a debian ${SRCDIR}/debian
26 echo "git clone git://projects.archlinux.org/pacman.git\\ngit checkout ${GITVERSION}" > ${SRCDIR}/debian/SOURCE
27 cd ${SRCDIR}; DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -rfakeroot -b -us -uc
28 lintian ${DEBS}
29
30 .PHONY: deb
31 deb ${DEB2}: ${DEB}
32
33 .PHONY: download
34 download ${SRCTAR}:
35 rm -rf ${SRCDIR} ${SRCTAR} pacman-git
36 git clone --depth=1 --branch=v${PACMANVER} git://projects.archlinux.org/pacman.git pacman-git
37 (cd pacman-git && git archive --prefix=${SRCDIR}/ --format=tar v${PACMANVER}) | gzip > ${SRCTAR}.tmp
38 mv ${SRCTAR}.tmp ${SRCTAR}
39 rm -rf pacman-git
40
41 distclean: clean
42
43 .PHONY: clean
44 clean:
45 rm -rf ${SRCDIR} ${SRCDIR}.tmp *_${ARCH}.deb *.changes *.dsc
46 find . -name '*~' -exec rm {} ';'
47
48 .PHONY: dinstall
49 dinstall: ${DEBS}
50 dpkg -i ${DEBS}