-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
53 lines (42 loc) · 1.25 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
VERSION=1.0
PACKAGE=libpve-storage-custom-mpnetapp-perl
PKGREL=5
DESTDIR=
PREFIX=/usr
SBINDIR=${PREFIX}/sbin
DOCDIR=${PREFIX}/share/doc/${PACKAGE}
export PERLDIR=${PREFIX}/share/perl5
SOURCES=MPNetappPlugin.pm
ARCH=all
GITVERSION:=$(shell cat .git/refs/heads/master)
DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
all: ${DEB}
.PHONY: dinstall
dinstall: deb
dpkg -i ${DEB}
.PHONY: install
install:
install -d ${DESTDIR}${PERLDIR}/PVE/Storage/Custom
for i in ${SOURCES}; do install -D -m 0644 $$i ${DESTDIR}${PERLDIR}/PVE/Storage/Custom/$$i; done
.PHONY: deb ${DEB}
deb ${DEB}:
rm -rf debian
mkdir debian
make DESTDIR=${CURDIR}/debian install
install -d -m 0755 debian/DEBIAN
sed -e s/@@VERSION@@/${VERSION}/ -e s/@@PKGRELEASE@@/${PKGREL}/ -e s/@@ARCH@@/${ARCH}/ <control.in >debian/DEBIAN/control
install -D -m 0644 copyright debian/${DOCDIR}/copyright
install -m 0644 changelog.Debian debian/${DOCDIR}/
install -m 0644 README debian/${DOCDIR}/
install -m 0644 triggers debian/DEBIAN
gzip -9 debian/${DOCDIR}/changelog.Debian
dpkg-deb --build debian
mv debian.deb ${DEB}
rm -rf debian
lintian ${DEB}
.PHONY: clean
clean:
rm -rf debian *.deb ${PACKAGE}-*.tar.gz dist *.1 *.tmp
find . -name '*~' -exec rm {} ';'
.PHONY: distclean
distclean: clean