]>
Commit | Line | Data |
---|---|---|
a009ec9d | 1 | PACKAGE=arch-pacman |
65cb252a | 2 | PACMANVER=5.1.3 |
a009ec9d WB |
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 \ | |
c1bda765 | 13 | ${PACKAGE}-dbgsym_${PACMANVER}-${DEBREL}_amd64.deb |
a009ec9d WB |
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 | |
a6b71b8a | 24 | echo "git clone https://gitlab.archlinux.org/pacman/pacman.git\\ngit checkout ${GITVERSION}" > ${SRCDIR}/debian/SOURCE |
a009ec9d WB |
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 | |
b8869739 WB |
32 | download: ${SRCTAR} |
33 | ${SRCTAR}: | |
a009ec9d | 34 | rm -rf ${SRCDIR} ${SRCTAR} pacman-git |
a6b71b8a | 35 | git clone --depth=1 --branch=v${PACMANVER} https://gitlab.archlinux.org/pacman/pacman.git pacman-git |
a009ec9d WB |
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 | ||
a009ec9d | 40 | distclean: clean |
fce6243f | 41 | rm -rf ${SRCDIR} ${SRCTAR} pacman-git |
a009ec9d WB |
42 | |
43 | .PHONY: clean | |
44 | clean: | |
7ba3a0a2 | 45 | rm -rf ${SRCDIR} ${SRCDIR}.tmp *_${ARCH}.deb *.changes *.dsc *.buildinfo |
a009ec9d WB |
46 | find . -name '*~' -exec rm {} ';' |
47 | ||
48 | .PHONY: dinstall | |
49 | dinstall: ${DEBS} | |
50 | dpkg -i ${DEBS} |