]>
Commit | Line | Data |
---|---|---|
561f47cf RV |
1 | VERSION != dpkg-parsechangelog -Sversion | cut -d- -f1 |
2 | PACKAGE != dpkg-parsechangelog -Ssource | |
3 | PKGREL != dpkg-parsechangelog -Sversion | cut -d- -f2 | |
918a6904 DM |
4 | |
5 | # h2xs -Afn LibArchive | |
6 | # h2xs -an LibArchive /usr/include/archive.h /usr/include/archive_entry.h | |
7 | # perl Makefile.PL PREFIX=/usr | |
8 | ||
918a6904 DM |
9 | |
10 | PPSRC = LibArchive | |
9d315569 RV |
11 | |
12 | ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) | |
13 | GITVERSION:=$(shell git rev-parse HEAD) | |
14 | ||
15 | BUILDSRC=${PACKAGE}-${VERSION} | |
16 | DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb | |
17 | DSC=${PACKAGE}_${VERSION}-${PKGREL}.dsc | |
918a6904 | 18 | |
eca488f9 | 19 | all: ${DEB} |
918a6904 | 20 | |
9d315569 RV |
21 | .PHONY: ${BUILDSRC} |
22 | ${BUILDSRC}: | |
23 | rm -rf ${BUILDSRC} | |
24 | rsync -a --exclude .svn ${PPSRC}/ ${BUILDSRC} | |
25 | cp -a debian ${BUILDSRC} | |
26 | echo "git clone git://git.proxmox.com/git/pve-storage.git\\ngit checkout ${GITVERSION}" >${BUILDSRC}/debian/SOURCE | |
27 | ||
28 | .PHONY: dsc | |
29 | dsc: ${DSC} | |
30 | ${DSC}: ${BUILDSRC} | |
31 | cd ${BUILDSRC}; dpkg-buildpackage -S -us -uc -d -nc | |
32 | lintian ${DSC} | |
33 | ||
34 | .PHONY: deb | |
35 | deb: ${DEB} | |
36 | ${DEB}: ${PPSRC}/LibArchive.xs ${BUILDSRC} | |
37 | cd ${BUILDSRC}; dpkg-buildpackage -b -us -uc -rfakeroot | |
eca488f9 | 38 | lintian ${DEB} |
918a6904 DM |
39 | |
40 | .phony: upload | |
eca488f9 DM |
41 | upload: ${DEB} |
42 | tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist stretch | |
918a6904 | 43 | |
9d315569 | 44 | CLEANFILES = *~ build *.deb libarchive_* libarchive-perl_* ${BUILDSRC} |
918a6904 DM |
45 | |
46 | .phony: clean | |
47 | clean: | |
48 | rm -rf ${CLEANFILES} | |
eca488f9 DM |
49 | |
50 | .PHONY: dinstall | |
51 | dinstall: ${DEB} | |
52 | dpkg -i ${DEB} |