1 include /usr
/share
/dpkg
/pkg-info.mk
2 include /usr
/share
/dpkg
/architecture.mk
4 PACKAGE
=libpve-u2f-server-perl
6 BUILDDIR
:= $(PACKAGE
)-$(DEB_VERSION
)
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
)_
$(DEB_HOST_ARCH
).deb
26 DSC
=$(PACKAGE
)_
$(DEB_VERSION
).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
54 cp
-a debian Makefile PVE U2F.xs base64.h
$@.tmp
/
55 echo
"git clone git://git.proxmox.com/git/libpve-u2f-server-perl.git\\ngit checkout $(GITVERSION)" > $@.tmp
/debian
/SOURCE
61 cd
$(BUILDDIR
); dpkg-buildpackage
-b
-us
-uc
67 cd
$(BUILDDIR
); dpkg-buildpackage
-S
-us
-uc
-d
72 rm -rf
*~
$(PACKAGE
)-[0-9]*/ *.deb
*.changes
*.buildinfo
*.build
*.dsc
$(PACKAGE
)*.
tar*
80 tar cf
- $(DEB
) | ssh repoman@repo.proxmox.com
-- upload
--product pve
--dist bullseye
--arch
$(DEB_HOST_ARCH
)