Skip to content
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.

Commit

Permalink
debian: install a Kbuild file, improve installation
Browse files Browse the repository at this point in the history
No more tempdir that might linger around becaue dh_clean
does not know about it.
Removes the dependency on uuid aswell, can build package
on a sbuild slave now.

Signed-off-by: Norbert Lange <[email protected]>
Signed-off-by: Park Ju Hyung <[email protected]>
  • Loading branch information
nolange authored and arter97 committed Oct 9, 2019
1 parent a58f466 commit 885e536
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions debian/exfat-dkms.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/src
2 changes: 2 additions & 0 deletions debian/local/print_rule.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
writeKbuild:
@printf 'obj-m += exfat.o\nexfat-objs := %s\n' "$(strip $(exfat-objs))" > $(KBUILD_PATH)
14 changes: 6 additions & 8 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,21 @@
include /usr/share/dpkg/pkg-info.mk

version := $(shell dpkg-parsechangelog | grep '^Version:' | cut -d' ' -f2)
TMPDIR := tmp.$(shell uuidgen)
targetdir := debian/tmp/usr/src/exfat-$(version)

%:
dh $@ --with dkms

override_dh_install:
mkdir $(TMPDIR)
cp Makefile $(TMPDIR)
sed -i -e /DKMS_DEFINE/c\CONFIG_EXFAT_FS=m $(TMPDIR)/Makefile
dh_install *.c *.h Kconfig LICENSE $(TMPDIR)/Makefile usr/src/exfat-$(version)/
rm -r $(TMPDIR)
override_dh_auto_install:
mkdir -p $(targetdir)
install -m644 *.c *.h Kconfig LICENSE Makefile $(targetdir)
# create a Kbuild file instead of patching the Makefile
$(MAKE) KERNELRELEASE=1 KBUILD_PATH=$(targetdir)/Kbuild -s -f Makefile -f debian/local/print_rule.mk writeKbuild

override_dh_dkms:
dh_dkms -V $(version)

override_dh_auto_configure:
override_dh_auto_build:
override_dh_auto_test:
override_dh_auto_install:
override_dh_auto_clean:

0 comments on commit 885e536

Please sign in to comment.