Initial commit
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
# This is the source.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 build function is executed in the source directory
|
||||
# This function is used to compile the source code
|
||||
build() {
|
||||
make CFLAGS="$CPPFLAGS $CFLAGS" LDFLAGS="$LDFLAGS" COPTS="-DHAVE_DNSSEC -DHAVE_DBUS -DHAVE_LIBIDN2 -DHAVE_CONNTRACK -DHAVE_NFTSET" PREFIX=/usr BINDIR=/usr/bin all-i18n
|
||||
|
||||
cd contrib/lease-tools
|
||||
make CFLAGS="$CPPFLAGS $CFLAGS" LDFLAGS="$LDFLAGS" COPTS="-DHAVE_DNSSEC -DHAVE_DBUS -DHAVE_LIBIDN2 -DHAVE_CONNTRACK -DHAVE_NFTSET" all
|
||||
}
|
||||
|
||||
# The package function is executed in the source directory
|
||||
# This function is used to move the compiled files into the output directory
|
||||
package() {
|
||||
make COPTS="-DHAVE_DNSSEC -DHAVE_DBUS -DHAVE_LIBIDN2 -DHAVE_CONNTRACK -DHAVE_NFTSET" DESTDIR="$BPM_OUTPUT" PREFIX=/usr BINDIR=/usr/bin install-i18n
|
||||
|
||||
# Install lease-tools
|
||||
install -Dm0755 'contrib/lease-tools/dhcp_'{release{,6},lease_time} -t "$BPM_OUTPUT"/usr/bin/
|
||||
install -Dm0644 'contrib/lease-tools/dhcp_'{release{,6},lease_time}.1 -t "$BPM_OUTPUT"/usr/share/man/man1
|
||||
|
||||
# Install dbus service
|
||||
install -Dm644 dbus/dnsmasq.conf "$BPM_OUTPUT"/usr/share/dbus-1/system.d/dnsmasq.conf
|
||||
|
||||
# Install configuration file
|
||||
install -Dm644 dnsmasq.conf.example "$BPM_OUTPUT"/etc/dnsmasq.conf
|
||||
|
||||
# Install sysusers file
|
||||
install -Dm644 "$BPM_WORKDIR"/sysusers "$BPM_OUTPUT"/usr/lib/sysusers.d/dnsmasq.conf
|
||||
|
||||
# DNSSEC setup
|
||||
sed -i 's,%%PREFIX%%,/usr,' "$BPM_OUTPUT"/etc/dnsmasq.conf
|
||||
install -Dm0644 "trust-anchors.conf" "$BPM_OUTPUT"/usr/share/dnsmasq/trust-anchors.conf
|
||||
|
||||
# Install package license
|
||||
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/dnsmasq/COPYING
|
||||
}
|
||||
Reference in New Issue
Block a user