Switch to new package format
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
# 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 prepare function is executed in the root of the temp directory
|
||||
# This function is used for putting downloaded files to the correct location or applying patches
|
||||
prepare() {
|
||||
# Decompress unifont file to source directory
|
||||
gunzip -c unifont.bdf.gz > "$BPM_SOURCE"/unifont.bdf
|
||||
|
||||
cd "$BPM_SOURCE"
|
||||
# Allow detection of non-versioned initramfs image file names
|
||||
patch -Np1 -i "$BPM_WORKDIR"/fix-initramfs-detection.patch
|
||||
# Add missing file
|
||||
echo depends bli part_gpt > grub-core/extra_deps.lst
|
||||
# Fix dejavu font directory
|
||||
sed 's|/usr/share/fonts/dejavu|/usr/share/fonts/dejavu /usr/share/fonts/TTF|g' -i "configure.ac"
|
||||
|
||||
autoreconf -fi
|
||||
}
|
||||
|
||||
# The build function is executed in the source directory
|
||||
# This function is used to compile the source code
|
||||
build() {
|
||||
unset {C,CPP,CXX,LD}FLAGS
|
||||
|
||||
./configure --prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--disable-efiemu \
|
||||
--disable-werror \
|
||||
--enable-boot-time \
|
||||
--enable-cache-stats \
|
||||
--with-platform=efi \
|
||||
--target=x86_64
|
||||
make
|
||||
}
|
||||
|
||||
# The package function is executed in the source directory
|
||||
# This function is used to move the compiled files into the output directory
|
||||
package() {
|
||||
make DESTDIR="$BPM_OUTPUT" bashcompletiondir=/usr/share/bash-completion/completions install
|
||||
|
||||
#Install font data files
|
||||
install -Dm644 ascii.h widthspec.h *.pf2 "$BPM_OUTPUT"/usr/share/grub/
|
||||
|
||||
# Install grub default file
|
||||
install -Dm644 "$BPM_WORKDIR"/grub.default "$BPM_OUTPUT"/etc/default/grub
|
||||
|
||||
# Install update-grub script
|
||||
install -Dm755 "$BPM_WORKDIR"/update-grub.sh "$BPM_OUTPUT"/usr/sbin/update-grub
|
||||
|
||||
# Install BPM hook
|
||||
install -Dm644 "$BPM_WORKDIR"/20-grub.bpmhook "$BPM_OUTPUT"/var/lib/bpm/hooks/20-grub.bpmhook
|
||||
|
||||
# Install package license
|
||||
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/grub/COPYING
|
||||
}
|
||||
Reference in New Issue
Block a user