d9e09b724036ada5ebff76354f2221bf571aac8c
[iproute2.git] / Makefile
1 RELEASE=4.1
2
3 VERSION=4.4.0
4 PKGREL=1
5
6 DIR=iproute2-${VERSION}
7 SRC=iproute2-${VERSION}.orig.tar.gz
8
9 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
10
11 DEBS=                                                   \
12         iproute2-doc_${VERSION}-${PKGREL}_all.deb       \
13         iproute2_${VERSION}-${PKGREL}_${ARCH}.deb
14
15 all: ${DEBS}
16         echo ${DEBS}
17
18 ${DEBS}: ${SRC}
19         rm -rf ${DIR}
20         tar xf ${SRC} 
21         cp -a debian ${DIR}/debian
22         cd ${DIR}; dpkg-buildpackage -rfakeroot -b -us -uc
23
24
25 download:
26         rm -rf iproute2-${VERSION} iproute2-${VERSION}.orig.tar.gz
27         git clone -b v${VERSION} --depth=1 git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git iproute2-${VERSION}
28         tar czf iproute2-${VERSION}.orig.tar.gz iproute2-${VERSION}/
29
30 .PHONY: upload
31 upload: ${DEBS}
32         umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw
33         mkdir -p /pve/${RELEASE}/extra
34         rm -f /pve/${RELEASE}/extra/iproute2_*.deb
35         rm -f /pve/${RELEASE}/extra/iproute2-doc_*.deb
36         rm -f /pve/${RELEASE}/extra/Packages*
37         cp ${DEBS} /pve/${RELEASE}/extra
38         cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
39         umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
40
41 .PHONY: clean
42 clean:
43         rm -rf *~ debian/*~ *.changes *.dsc ${DIR} iproute2_${VERSION}.orig.tar.gz *.deb
44
45 .PHONY: dinstall
46 dinstall: ${DEBS}
47         dpkg -i ${DEBS}