]> git.proxmox.com Git - arch-pacman.git/blob - Makefile
e2989bd6f5e4fcace6caae29c380ed57f841670f
[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://git.proxmox.com/git/arch-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 # FIXME:
42 #.PHONY: upload
43 #upload: ${DEBS}
44 # umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw
45 # mkdir -p /pve/${RELEASE}/extra
46 # rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb
47 # rm -f /pve/${RELEASE}/extra/${PACKAGE}-dev_*.deb
48 # rm -f /pve/${RELEASE}/extra/${PACKAGE}-dbg_*.deb
49 # rm -f /pve/${RELEASE}/extra/Packages*
50 # cp ${DEBS} /pve/${RELEASE}/extra
51 # cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
52 # umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
53
54 distclean: clean
55
56 .PHONY: clean
57 clean:
58 rm -rf ${SRCDIR} ${SRCDIR}.tmp *_${ARCH}.deb *.changes *.dsc
59 find . -name '*~' -exec rm {} ';'
60
61 .PHONY: dinstall
62 dinstall: ${DEBS}
63 dpkg -i ${DEBS}