]> git.proxmox.com Git - arch-pacman.git/blame - Makefile
import
[arch-pacman.git] / Makefile
CommitLineData
a009ec9d
WB
1RELEASE=4.2.1
2
3PACKAGE=arch-pacman
4PACMANVER=4.2.1
5DEBREL=1
6
7SRCDIR=pacman
8SRCTAR=${SRCDIR}.tgz
9
10ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
11GITVERSION:=$(shell cat .git/refs/heads/master)
12
13DEB=${PACKAGE}_${PACMANVER}-${DEBREL}_amd64.deb
14DEB2=${PACKAGE}-dev_${PACMANVER}-${DEBREL}_amd64.deb \
15 ${PACKAGE}-dbg_${PACMANVER}-${DEBREL}_amd64.deb
16
17DEBS= ${DEB} ${DEB2}
18
19all: ${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
31deb ${DEB2}: ${DEB}
32
33.PHONY: download
34download ${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
54distclean: clean
55
56.PHONY: clean
57clean:
58 rm -rf ${SRCDIR} ${SRCDIR}.tmp *_${ARCH}.deb *.changes *.dsc
59 find . -name '*~' -exec rm {} ';'
60
61.PHONY: dinstall
62dinstall: ${DEBS}
63 dpkg -i ${DEBS}