1 include /usr
/share
/dpkg
/pkg-info.mk
2 include /usr
/share
/dpkg
/architecture.mk
4 PACKAGE
=libpve-u2f-server-perl
6 BUILDSRC
:= $(PACKAGE
)-$(DEB_VERSION_EPOCH_UPSTREAM
)
11 DOCDIR
=$(PREFIX
)/share
/doc
/$(PACKAGE
)
12 PERLDIR
=$(PREFIX
)/share
/perl5
14 PERL_ARCHLIB
!= perl
-MConfig
-e
'print $$Config{archlib};'
15 PERL_INSTALLVENDORARCH
!= perl
-MConfig
-e
'print $$Config{installvendorarch};'
16 PERL_APIVER
!= perl
-MConfig
-e
'print $$Config{debian_abi}//$$Config{version};'
17 PERL_CC
!= perl
-MConfig
-e
'print $$Config{cc};'
18 PERLSODIR
=$(PERL_INSTALLVENDORARCH
)/auto
19 CFLAGS
:= -shared
-fPIC
-O2
-Werror
-Wtype-limits
-Wall
-Wl
,-z
,relro \
20 -D_FORTIFY_SOURCE
=2 -I
$(PERL_ARCHLIB
)/CORE
-DXS_VERSION
=\"1.0\"
22 CFLAGS
+= `pkg-config --cflags u2f-server`
23 LIBS
+= `pkg-config --libs u2f-server`
25 DEB
=$(PACKAGE
)_
$(DEB_VERSION_UPSTREAM_REVISION
)_
$(DEB_BUILD_ARCH
).deb
26 DSC
=$(PACKAGE
)_
$(DEB_VERSION_UPSTREAM_REVISION
).dsc
28 GITVERSION
:=$(shell git rev-parse HEAD
)
33 perl
-MDevel
::PPPort
-e
'Devel::PPPort::WriteFile();'
36 xsubpp U2F.xs
> U2F.xsc
39 U2F.so
: U2F.c ppport.h
40 $(PERL_CC
) $(CFLAGS
) -o U2F.so U2F.c
$(LIBS
)
47 install: PVE
/U2F.pm U2F.so
48 install -D
-m
0644 PVE
/U2F.pm
$(DESTDIR
)$(PERLDIR
)/PVE
/U2F.pm
49 install -D
-m
0644 -s U2F.so
$(DESTDIR
)$(PERLSODIR
)/PVE
/U2F
/U2F.so
55 rsync
-a debian Makefile PVE U2F.xs base64.h
$(BUILDSRC
)/
56 echo
"git clone git://git.proxmox.com/git/libpve-u2f-server-perl.git\\ngit checkout $(GITVERSION)" > $(BUILDSRC
)/debian
/SOURCE
61 cd
$(BUILDSRC
); dpkg-buildpackage
-b
-us
-uc
67 cd
$(BUILDSRC
); dpkg-buildpackage
-S
-us
-uc
-d
-nc
72 rm -rf
*~
${BUILDSRC} *.deb
*.changes
*.buildinfo
*.dsc
*.
tar.gz
73 find .
-name
'*~' -exec
rm {} ';'
81 tar cf
- $(DEB
) | ssh repoman@repo.proxmox.com
-- upload
--product pve
--dist buster
--arch
$(DEB_BUILD_ARCH
)