]> git.proxmox.com Git - tar.git/blame - Makefile
fix upload target
[tar.git] / Makefile
CommitLineData
a9d6e8dc 1RELEASE=4.1
16e13d18
DM
2
3# Note: compile as root fail, so you need to do that as unpriv. user
4
5TARVER=1.27.1
b54031c5 6DEBREL=2
a9d6e8dc 7PVETARVER=${TARVER}+pve.3
16e13d18
DM
8
9# also update changelog
10
11TARSRC=tar_${TARVER}.orig.tar.xz
12TARDEBSRC=tar_${TARVER}-${DEBREL}.debian.tar.xz
13TARDIR=tar-${TARVER}
14
15ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
16GITVERSION:=$(shell cat .git/refs/heads/master)
17SOURCETXT="git clone git://git.proxmox.com/git/tar.git\\ngit checkout ${GITVERSION}"
18
19DEB=tar_${PVETARVER}_${ARCH}.deb
20
21all: deb
22
23.PHONY: dinstall
c2c6e046 24dinstall: ${DEB}
16e13d18
DM
25 dpkg -i ${DEB}
26
27.PHONY: deb
28deb ${DEB}: ${TARSRC}
29 rm -rf ${TARDIR}
30 tar xf ${TARSRC}
31 cd ${TARDIR}; tar xf ../${TARDEBSRC}
32 echo "${SOURCETXT}" > ${TARDIR}/debian/SOURCE
33 echo "debian/SOURCE" >>${TARDIR}/debian/docs
34 mv ${TARDIR}/debian/changelog ${TARDIR}/debian/changelog.org
35 cat changelog ${TARDIR}/debian/changelog.org >${TARDIR}/debian/changelog
39d1dc12 36 cd ${TARDIR}; patch -p1 <../acls-bugfix.patch
16e13d18
DM
37 cd ${TARDIR}; dpkg-buildpackage -b -uc -us
38
39.PHONY: upload
40upload:
41 umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw
42 mkdir -p /pve/${RELEASE}/extra
931c242f 43 rm -rf /pve/${RELEASE}/extra/tar_*.deb
16e13d18
DM
44 rm -rf /pve/${RELEASE}/extra/Packages*
45 cp ${DEB} /pve/${RELEASE}/extra
46 cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
47 umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
48
49.PHONY: clean
50clean:
51 rm -rf *~ *_${ARCH}.deb *_all.deb *_${ARCH}.udeb *.changes *.dsc ${TARDIR}