2019-05-22 12:28:08 +02:00
i n c l u d e / u s r / s h a r e / d p k g / p k g - i n f o . m k
i n c l u d e / u s r / s h a r e / d p k g / a r c h i t e c t u r e . m k
2015-04-15 12:51:59 +02:00
PACKAGE = lxc-pve
2015-04-04 14:24:20 +02:00
2015-04-15 12:51:59 +02:00
SRCDIR = lxc
2019-05-22 12:28:08 +02:00
BUILDSRC := $( PACKAGE) -$( DEB_VERSION_UPSTREAM)
2015-04-04 14:24:20 +02:00
2019-05-22 12:28:08 +02:00
DEB_BASE = $( PACKAGE) _$( DEB_VERSION_UPSTREAM_REVISION)
DEB1 = $( DEB_BASE) _$( DEB_BUILD_ARCH) .deb
DEB2 = $( PACKAGE) -dev_$( DEB_VERSION_UPSTREAM_REVISION) _$( DEB_BUILD_ARCH) .deb \
$( PACKAGE) -dbgsym_$( DEB_VERSION_UPSTREAM_REVISION) _$( DEB_BUILD_ARCH) .deb
2017-02-09 13:25:52 +01:00
DEBS = $( DEB1) $( DEB2)
2018-11-07 17:01:47 +01:00
DSC = $( DEB_BASE) .dsc
2023-05-05 10:21:18 +02:00
ORIG_SRC_TAR = $( PACKAGE) _$( DEB_VERSION_UPSTREAM) .orig.tar.gz
2015-04-04 14:24:20 +02:00
2018-11-07 17:01:47 +01:00
all : $( DEBS )
echo $( DEBS)
2015-04-04 15:05:38 +02:00
2017-11-20 11:14:38 +01:00
.PHONY : submodule
submodule :
2018-11-07 17:01:47 +01:00
test -f " $( SRCDIR) /debian/changelog " || git submodule update --init
2017-11-20 11:14:38 +01:00
2018-11-07 17:01:47 +01:00
$(BUILDSRC) : lxc debian config | submodule
2017-11-20 11:14:38 +01:00
rm -rf $( BUILDSRC)
2018-07-19 11:33:35 +02:00
cp -a $( SRCDIR) $( BUILDSRC)
2017-11-20 11:14:38 +01:00
cp -a debian $( BUILDSRC) /debian
2018-03-30 10:17:26 +02:00
mkdir $( BUILDSRC) /debian/config
for i in config/*.conf.in; do \
sed -e 's|@LXCTEMPLATECONFIG@|/usr/share/lxc/config|g' $$ i > $( BUILDSRC) /debian/$$ { i%.in} ; \
done
2018-11-07 17:01:47 +01:00
echo " git clone git://git.proxmox.com/git/lxc.git\\ngit checkout $( shell git rev-parse HEAD) " > $( BUILDSRC) /debian/SOURCE
.PHONY : deb
deb : $( DEBS )
$(DEB2) : $( DEB 1)
$(DEB1) : $( BUILDSRC )
rm -f *.deb
cd $( BUILDSRC) ; dpkg-buildpackage -b -us -uc
2017-11-20 11:14:38 +01:00
lintian $( DEBS)
2015-04-04 14:24:20 +02:00
2023-05-05 10:21:18 +02:00
$(ORIG_SRC_TAR) : $( BUILDSRC )
2023-05-08 12:36:29 +02:00
tar czf $( ORIG_SRC_TAR) --exclude= " $( BUILDSRC) /debian " $( BUILDSRC)
2023-05-05 10:21:18 +02:00
2018-11-07 17:01:47 +01:00
.PHONY : dsc
2023-05-05 10:21:18 +02:00
dsc : $( DSC )
$(DSC) : $( ORIG_SRC_TAR )
2018-11-07 17:01:47 +01:00
rm -f *.dsc
2023-05-05 12:14:04 +02:00
cd $( BUILDSRC) ; dpkg-buildpackage -S -us -uc -d
2018-11-07 17:01:47 +01:00
lintian $( DSC)
2023-05-08 12:37:31 +02:00
sbuild : $( DSC )
sbuild $( DSC)
2015-04-04 15:05:38 +02:00
.PHONY : upload
2018-11-07 17:01:47 +01:00
upload : $( DEBS )
2023-05-05 10:20:55 +02:00
tar cf - $( DEBS) | ssh repoman@repo.proxmox.com upload --product pve --dist bookworm
2015-04-04 15:05:38 +02:00
2015-04-04 14:24:20 +02:00
distclean : clean
.PHONY : clean
clean :
2023-05-05 10:26:26 +02:00
rm -rf $( BUILDSRC) $( PACKAGE) -[ 0-9] */ $( ORIG_SRC_TAR) *.deb *.dsc $( PACKAGE) *.debian.tar.[ gx] z *.changes *.dsc *.buildinfo *.build
2015-04-04 15:05:38 +02:00
.PHONY : dinstall
2018-11-07 17:01:47 +01:00
dinstall : $( DEBS )
dpkg -i $( DEBS)