Switch to new package format
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package
|
||||
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
||||
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
||||
|
||||
# The package function is executed in the source directory
|
||||
# This function is used to move the compiled files into the output directory
|
||||
package() {
|
||||
cd "$BPM_SOURCE"/hid-xpadneo
|
||||
|
||||
sed -E \
|
||||
-e '/^CLEAN/d' \
|
||||
-e '/^POST_INSTALL/d' \
|
||||
-e '/^POST_REMOVE/d' \
|
||||
-e 's/@DO_NOT_CHANGE@/'"v${BPM_PKG_VERSION}"'/g' \
|
||||
dkms.conf.in > dkms.conf
|
||||
|
||||
rm -f dkms.post_*
|
||||
|
||||
# Install dkms files
|
||||
local TARGET_DIR="$BPM_OUTPUT"/usr/src/hid-xpadneo-v${BPM_PKG_VERSION}
|
||||
install -Dm644 dkms.conf "$TARGET_DIR"/dkms.conf
|
||||
install -Dm644 Makefile "$TARGET_DIR"/Makefile
|
||||
cp -a src -t "$TARGET_DIR"
|
||||
|
||||
# Install module dependencies
|
||||
install -Dm644 etc-modprobe.d/* -t "$BPM_OUTPUT"/usr/lib/modprobe.d
|
||||
install -Dm644 etc-udev-rules.d/* -t "$BPM_OUTPUT"/usr/lib/udev/rules.d
|
||||
|
||||
# Install package license
|
||||
install -Dm644 "$BPM_SOURCE"/LICENSE.md "$BPM_SOURCE"/LICENSES/*.txt -t "$BPM_OUTPUT"/usr/share/licenses/xpadneo
|
||||
}
|
||||
Reference in New Issue
Block a user