6c62713ac53092732dde570763f4166f7f223d34
[iproute2.git] / Makefile
1 RELEASE=4.2
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 git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git iproute2-${VERSION}
28         cd iproute2-${VERSION}; git checkout v4.2.0;
29         tar czf iproute2-${VERSION}.orig.tar.gz iproute2-${VERSION}/
30
31 .PHONY: upload
32 upload: ${DEBS}
33         umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw
34         mkdir -p /pve/${RELEASE}/extra
35         rm -f /pve/${RELEASE}/extra/iproute2_*.deb
36         rm -f /pve/${RELEASE}/extra/iproute2-doc_*.deb
37         rm -f /pve/${RELEASE}/extra/Packages*
38         cp ${DEBS} /pve/${RELEASE}/extra
39         cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
40         umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
41
42 .PHONY: clean
43 clean:
44         rm -rf *~ debian/*~ *.changes *.dsc ${DIR} iproute2_${VERSION}.orig.tar.gz *.deb
45
46 .PHONY: dinstall
47 dinstall: ${DEBS}
48         dpkg -i ${DEBS}