Switch to new package format
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
# 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
|
||||
|
||||
prepare() {
|
||||
cd "$BPM_SOURCE"
|
||||
patch -Np1 -i "$BPM_WORKDIR"/0001-udev-activation-without-systemd.patch
|
||||
patch -Np1 -i "$BPM_WORKDIR"/0002-libdm-makefile-add-an-empty-target-install_lvm2.patch
|
||||
}
|
||||
|
||||
# The build function is executed in the source directory
|
||||
# This function is used to compile the source code
|
||||
build() {
|
||||
./configure --prefix=/usr \
|
||||
--enable-cmdlib \
|
||||
--enable-dmeventd \
|
||||
--enable-fsadm \
|
||||
--enable-pkgconfig \
|
||||
--enable-readline \
|
||||
--enable-udev_sync \
|
||||
--enable-udev_rules \
|
||||
--without-systemd-run \
|
||||
--with-default-pid-dir=/run \
|
||||
--with-default-dm-run-dir=/run \
|
||||
--with-default-run-dir=/run/lvm \
|
||||
--with-default-locking-dir=/run/lock/lvm
|
||||
make
|
||||
}
|
||||
|
||||
# The package function is executed in the source directory
|
||||
# This function is used to move the compiled files into the output directory
|
||||
package_lvm2() {
|
||||
make DESTDIR="$BPM_OUTPUT" install_lvm2
|
||||
|
||||
# Install package license
|
||||
install -Dm644 "$BPM_SOURCE"/COPYING.BSD "$BPM_OUTPUT"/usr/share/licenses/lvm2/COPYING.BSD
|
||||
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/lvm2/COPYING
|
||||
install -Dm644 "$BPM_SOURCE"/COPYING.LIB "$BPM_OUTPUT"/usr/share/licenses/lvm2/COPYING.LIB
|
||||
}
|
||||
|
||||
package_device-mapper() {
|
||||
make DESTDIR="$BPM_OUTPUT" install_device-mapper
|
||||
|
||||
# Install package license
|
||||
install -Dm644 "$BPM_SOURCE"/COPYING.BSD "$BPM_OUTPUT"/usr/share/licenses/lvm2/COPYING.BSD
|
||||
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/lvm2/COPYING
|
||||
install -Dm644 "$BPM_SOURCE"/COPYING.LIB "$BPM_OUTPUT"/usr/share/licenses/lvm2/COPYING.LIB
|
||||
}
|
||||
Reference in New Issue
Block a user