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