Initial commit
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
# Ignore BPM archives and signatures
|
||||
*.bpm
|
||||
*.bpm.sig
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
URL="https://sourceforge.net/projects/cdrtools/files/alpha"
|
||||
|
||||
# Get version number from tag name
|
||||
VERSION=$(curl -s -L "$URL" | grep -o -P 'cdrtools-(\d+\.\d+[ab]\d+)\.tar\.gz' | sort -V | tail -n1)
|
||||
|
||||
# Trim prefix
|
||||
VERSION=${VERSION//cdrtools-}
|
||||
|
||||
# Trim suffix
|
||||
VERSION=${VERSION//.tar.gz}
|
||||
|
||||
echo "$VERSION"
|
||||
@@ -0,0 +1,22 @@
|
||||
name: cdrtools
|
||||
description: Highly portable CD/DVD/BluRay command line recording software
|
||||
version: 3.02a09
|
||||
revision: 1
|
||||
url: https://sourceforge.net/projects/cdrtools/
|
||||
license: CDDL-1.0,GPL-2.0-or-later,LGPL-2.1-or-later
|
||||
maintainers:
|
||||
- [email protected]
|
||||
architecture: any
|
||||
type: source
|
||||
depends:
|
||||
- acl
|
||||
- glibc
|
||||
- libcap
|
||||
downloads:
|
||||
- url: https://downloads.sourceforge.net/project/cdrtools/alpha/cdrtools-${BPM_PKG_VERSION}.tar.gz
|
||||
extract_to: ${BPM_SOURCE}
|
||||
extract_strip_components: 1
|
||||
checksum: c7e4f732fb299e9b5d836629dadf5512aa5e6a5624ff438ceb1d056f4dcb07c2
|
||||
keep:
|
||||
- etc/default/cdrecord
|
||||
- etc/default/rscsi
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
setcap cap_sys_resource,cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_ipc_lock,cap_sys_rawio+ep /usr/bin/cdrecord
|
||||
setcap cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_sys_rawio+ep /usr/bin/cdda2wav
|
||||
setcap cap_dac_override,cap_sys_admin,cap_net_bind_service,cap_sys_rawio+ep /usr/bin/readcd
|
||||
@@ -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() {
|
||||
cd "$BPM_SOURCE"
|
||||
|
||||
sed -i 's|/opt/schily|/usr|g' DEFAULTS/Defaults.linux
|
||||
sed -i 's|DEFINSGRP=.*|DEFINSGRP=root|' DEFAULTS/Defaults.linux
|
||||
sed -i 's|INSDIR=\s*sbin|INSDIR=bin|' rscsi/Makefile
|
||||
}
|
||||
|
||||
# The build function is executed in the source directory
|
||||
# This function is used to compile the source code
|
||||
build() {
|
||||
export GMAKE_NOWARN=true
|
||||
export CFLAGS="$CFLAGS -std=gnu89 -fno-strict-aliasing"
|
||||
make -j1 INS_BASE=/usr INS_RBASE=/ VERSION_OS="TideLinux" LDOPTX="$LDFLAGS"
|
||||
}
|
||||
|
||||
# The check function is executed in the source directory
|
||||
# This function is used to run tests to verify the package has been compiled correctly
|
||||
check() {
|
||||
make tests
|
||||
}
|
||||
|
||||
# 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" install
|
||||
|
||||
export GMAKE_NOWARN=true
|
||||
make INS_BASE=/usr INS_RBASE=/ DESTDIR="$BPM_OUTPUT" install
|
||||
|
||||
# Remove static libraries, headers & conflicting man pages
|
||||
rm "$BPM_OUTPUT"/usr/lib/*.a
|
||||
rm -r "$BPM_OUTPUT"/usr/lib/profiled
|
||||
rm -r "$BPM_OUTPUT"/usr/include
|
||||
rm -r "$BPM_OUTPUT"/usr/share/man/man3
|
||||
|
||||
# Autoload 'sg' module needed by cdrecord
|
||||
echo sg | install -vDm644 /dev/stdin "$BPM_OUTPUT"/usr/lib/modules-load.d/cdrecord.conf
|
||||
|
||||
# Patch binary permissions, by default it's swx--x--x
|
||||
chmod a+rx "$BPM_OUTPUT"/usr/bin/*
|
||||
|
||||
# Create symlinks for cdrkit compatibility
|
||||
ln -s /usr/bin/cdrecord "$BPM_OUTPUT"/usr/bin/wodim
|
||||
ln -s /usr/bin/readcd "$BPM_OUTPUT"/usr/bin/readom
|
||||
ln -s /usr/bin/mkisofs "$BPM_OUTPUT"/usr/bin/genisoimage
|
||||
ln -s /usr/bin/cdda2wav "$BPM_OUTPUT"/usr/bin/icedax
|
||||
|
||||
# Install package license
|
||||
install -Dm644 "$BPM_SOURCE"/{COPYING,CDDL.Schily.txt,GPL-2.0.txt,LGPL-2.1.txt} -t "$BPM_OUTPUT"/usr/share/licenses/cdrtools
|
||||
}
|
||||
Reference in New Issue
Block a user