2015-02-18 11:30:48 +01:00
RELEASE = 4.0
2014-12-01 06:22:52 +01:00
2015-02-18 11:30:48 +01:00
VERSION = 0.1
PACKAGE = pve-ha-manager
2015-02-19 08:59:01 +01:00
SIMPACKAGE = pve-ha-simulator
2015-02-18 11:30:48 +01:00
PKGREL = 1
2014-12-01 06:22:52 +01:00
2015-03-09 10:47:19 +01:00
GITVERSION := $( shell cat .git/refs/heads/master)
2014-12-01 06:22:52 +01:00
2015-03-09 09:34:21 +01:00
ARCH := $( shell dpkg-architecture -qDEB_BUILD_ARCH)
2015-02-18 11:30:48 +01:00
DEB = ${ PACKAGE } _${ VERSION } -${ PKGREL } _${ ARCH } .deb
2015-03-09 09:34:21 +01:00
SIMDEB = ${ SIMPACKAGE } _${ VERSION } -${ PKGREL } _all.deb
2015-02-18 11:30:48 +01:00
2015-02-19 08:59:01 +01:00
all : ${DEB } ${SIMDEB }
2015-02-18 11:30:48 +01:00
2015-02-19 08:59:01 +01:00
.PHONY : dinstall simdeb
dinstall : deb simdeb
dpkg -i ${ DEB } ${ SIMDEB }
2015-02-18 11:30:48 +01:00
2015-02-19 08:59:01 +01:00
.PHONY : simdeb ${SIMDEB }
simdeb ${SIMDEB} :
rm -rf build
mkdir build
2015-03-09 10:47:19 +01:00
rsync -a src/ build
rsync -a simdebian/ build/debian
cp changelog.Debian build/debian/changelog
echo " git clone git://git.proxmox.com/git/pve-ha-manager.git\\ngit checkout ${ GITVERSION } " > build/debian/SOURCE
cd build; dpkg-buildpackage -rfakeroot -b -us -uc
2015-02-19 08:59:01 +01:00
lintian ${ SIMDEB }
2015-02-18 11:30:48 +01:00
.PHONY : deb ${DEB }
deb ${DEB} :
rm -rf build
mkdir build
2015-03-09 10:47:19 +01:00
rsync -a src/ build
rsync -a debian/ build/debian
cp changelog.Debian build/debian/changelog
echo " git clone git://git.proxmox.com/git/pve-ha-manager.git\\ngit checkout ${ GITVERSION } " > build/debian/SOURCE
cd build; dpkg-buildpackage -rfakeroot -b -us -uc
2015-02-18 11:30:48 +01:00
lintian ${ DEB }
2014-12-01 06:22:52 +01:00
2014-12-01 07:06:38 +01:00
.PHONY : clean
2015-03-09 10:47:19 +01:00
clean :
rm -rf build *.deb ${ PACKAGE } -*.tar.gz *.changes
2015-02-18 11:30:48 +01:00
find . -name '*~' -exec rm { } ';'
.PHONY : distclean
distclean : clean
2014-12-01 07:06:38 +01:00