Switch to new download format, remove dependencies field from esvm service and enable documentation
This commit is contained in:
@@ -2,49 +2,38 @@
|
||||
# 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
|
||||
|
||||
DOWNLOAD="https://github.com/polkit-org/polkit/archive/${BPM_PKG_VERSION}/polkit-${BPM_PKG_VERSION}.tar.gz"
|
||||
# Removes systemd dependency when using elogind
|
||||
DOWNLOAD_PATCH="https://github.com/polkit-org/polkit/commit/55ee1b70456eca8281dda9612c485c619122f202.patch"
|
||||
FILENAME="${DOWNLOAD##*/}"
|
||||
FILENAME_PATCH="${DOWNLOAD_PATCH##*/}"
|
||||
|
||||
# The prepare function is executed in the root of the temp directory
|
||||
# This function is used for downloading files and putting them into the correct location
|
||||
prepare() {
|
||||
wget "$DOWNLOAD"
|
||||
wget "$DOWNLOAD_PATCH"
|
||||
tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE"
|
||||
|
||||
cd "$BPM_SOURCE"
|
||||
git apply ../${FILENAME_PATCH}
|
||||
patch -Np1 -i "$BPM_WORKDIR"/elogind-support.patch
|
||||
}
|
||||
|
||||
# The build function is executed in the source directory
|
||||
# This function is used to compile the source code
|
||||
build() {
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
meson setup --prefix=/usr \
|
||||
--libdir=/usr/lib \
|
||||
--buildtype=release \
|
||||
-Dman=true \
|
||||
-Dgtk_doc=true \
|
||||
-Dos_type=lfs \
|
||||
-Dpolkitd_uid=9 \
|
||||
-Dpolkitd_user=polkitd \
|
||||
-Dsession_tracking=elogind \
|
||||
-Dsystemdsystemunitdir=/tmp \
|
||||
-Dtests=false ..
|
||||
ninja
|
||||
-Dtests=false build
|
||||
meson compile -C build
|
||||
}
|
||||
|
||||
# The package function is executed in the source directory
|
||||
# This function is used to move the compiled files into the output directory
|
||||
package() {
|
||||
cd build
|
||||
|
||||
DESTDIR="$BPM_OUTPUT" ninja install
|
||||
package() {
|
||||
meson install -C build --destdir="$BPM_OUTPUT"
|
||||
|
||||
# Install esvm service
|
||||
install -Dm644 "$BPM_WORKDIR"/polkitd.esv "$BPM_OUTPUT"/etc/esvm/services/polkitd.esv
|
||||
install -Dm644 ../COPYING "$BPM_OUTPUT"/usr/share/licenses/polkit/COPYING
|
||||
|
||||
# Install package license
|
||||
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/polkit/COPYING
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user