diff --git a/main.sh b/main.sh index baf6d24..d9f57ba 100755 --- a/main.sh +++ b/main.sh @@ -14,6 +14,9 @@ echo -e "nvidia-pikaos-kernel-module ($(cat ./DRIVER)-$(cat ./KERNEL)-99pika1.lu echo -e "Source: nvidia-pikaos-kernel-module\nSection: graphics\nPriority: optional\nMaintainer: Ward Nakchbandi \nStandards-Version: 4.6.1\nBuild-Depends: debhelper-compat (= 13), linux-image-$(cat ./KERNEL), linux-headers-$(cat ./KERNEL), dkms, fakeroot\nRules-Requires-Root: no\n\nPackage: nvidia-$(cat ./KERNEL)-module-$DRIVER\nArchitecture: linux-any\nDepends: linux-image-$(cat ./KERNEL), linux-headers-$(cat ./KERNEL), $(apt-cache show nvidia-dkms-$DRIVER | grep Depends: | head -n1 | cut -f2 -d":")\nConflicts: nvidia-dkms-$DRIVER (= $(cat DRIVER_VERSION))\nProvides: nvidia-dkms-$DRIVER (= $(cat DRIVER_VERSION))\nReplaces: nvidia-dkms-$DRIVER (= $(cat DRIVER_VERSION))\nDescription: Prebuilt Nvidia module for PikaOS kernel" > ./debian/control +echo -e "DRIVER=$(cat ./KERNEL)\nKERNEL=$(cat ./KERNEL)\nVERSION=$(cat ./KERNEL)\nMK_WORKDIR=$(env | grep -w "PWD" | cut -c5-)\nCARCH=x86_64" > ./Makefile +cat ./Makefiletmp > ./Makefile + DEBIAN_FRONTEND=noninteractive # Get build deps diff --git a/nvidia-pikaos-kernel-module/Makefile b/nvidia-pikaos-kernel-module/Makefile deleted file mode 100644 index 995d561..0000000 --- a/nvidia-pikaos-kernel-module/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -DRIVER=$(shell cat ${./DRIVER}) -KERNEL=$(shell cat ${./KERNEL}) -VERSION=$(shell cat ${./VERSION}) -CARCH=x86_64 - -.PHONY: install -all: - true - -install: - fakeroot dkms build --dkmstree "$(shell ./get_pwd.sh)" -m nvidia/"${DRIVER}" -k "${KERNEL}" - install -Dt "$(DESTDIR)/usr/lib/modules/"${KERNEL}"/extramodules" -m644 nvidia/"${DRIVER}"/"${KERNEL}"/"${CARCH}"/module/* - find "$(DESTDIR)" -name '*.ko' -exec xz -T1 {} + \ No newline at end of file diff --git a/nvidia-pikaos-kernel-module/Makefiletmp b/nvidia-pikaos-kernel-module/Makefiletmp new file mode 100644 index 0000000..f02f6e4 --- /dev/null +++ b/nvidia-pikaos-kernel-module/Makefiletmp @@ -0,0 +1,11 @@ + + + +.PHONY: install +all: + true + +install: + fakeroot dkms build --dkmstree "${MK_WORKDIR}" -m nvidia/"${DRIVER}" -k "${KERNEL}" + install -Dt "$(DESTDIR)/usr/lib/modules/"${KERNEL}"/extramodules" -m644 nvidia/"${DRIVER}"/"${KERNEL}"/"${CARCH}"/module/* + find "$(DESTDIR)" -name '*.ko' -exec xz -T1 {} + \ No newline at end of file diff --git a/nvidia-pikaos-kernel-module/get_pwd.sh b/nvidia-pikaos-kernel-module/get_pwd.sh deleted file mode 100644 index ef98ce9..0000000 --- a/nvidia-pikaos-kernel-module/get_pwd.sh +++ /dev/null @@ -1,2 +0,0 @@ -#! /bin/sh -env | grep -w "PWD" | cut -c5-