summaryrefslogtreecommitdiff
path: root/repo/cdrkit/cdrkit.xibuild
blob: a9add1edec464ce2c9af98da98b2392968e7783e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh

NAME="cdrkit"
DESC="Suite of programs for CD/DVD recording, ISO image creation, and audio CD extraction"

MAKEDEPS=" cmake libcap bzip2 zlib"

PKG_VER=1.1.11
SOURCE="https://dev.alpinelinux.org/archive/cdrkit/cdrkit-$PKG_VER.tar.gz"

ADDITIONAL="
gcc10.patch
"

prepare() {
	# disable rcmd, it is security risk and not implemented in musl
	sed -i include/xconfig.h.in -e "s/#define HAVE_RCMD 1/#undef HAVE_RCMD/g"
    apply_patches
}

build() {
	export CFLAGS="$CFLAGS -D__THROW=''"
    cmake -B build \
        -DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=/usr/lib \
		-DBUILD_SHARED_LIBS=True \
        -DBUILD_STATIC_LIBS=OFF
	cmake --build build
}

package() {
	DESTDIR="$PKG_DEST" cmake --install build
	cd "$PKG_DEST/usr/bin"
	ln -s wodim cdrecord
	ln -s readom readcd
	ln -s genisoimage mkisofs
	ln -s genisoimage mkhybrid
	ln -s icedax cdda2wav
	cd "$PKG_DEST/usr/share/man/man1"
	ln -s wodim.1 cdrecord.1
	ln -s readom.1 readcd.1
	ln -s genisoimage.1 mkisofs.1
	ln -s genisoimage.1 mkhybrid.1
	ln -s icedax.1 cdda2wav.1
}