summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Swanson2018-05-29 15:51:23 -0700
committerMike Swanson2018-05-29 15:51:23 -0700
commit20027a13bb3339c025dfd362ca757dbc199a85ef (patch)
tree047b4e946b6686fb53be4f3673c55b149dc6fb31
parent776fe779a569cdb8266dc90676f2ee1c22ffa904 (diff)
downloadaur-cmdpack.tar.gz
Update so the debug package doesn’t break pacman, unravel eval
-rw-r--r--.SRCINFO23
-rw-r--r--0001_symlink-ecm2bin-manpage.patch28
-rw-r--r--PKGBUILD160
3 files changed, 160 insertions, 51 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ab84fbea8ff..11f2c08ff73 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Sat Jan 28 22:24:16 UTC 2017
+# Tue May 29 22:49:49 UTC 2018
pkgbase = cmdpack
pkgdesc = Collection of command line utilities, most for emulation or disk images. (bin2ecm bincomp brrrip byteshuf cdpatch fakecrc hax65816 pecompat rels screamf uips vb2rip wordadd)
pkgver = 1.06
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/chungy/cmdpack
arch = i686
arch = x86_64
@@ -11,60 +11,47 @@ pkgbase = cmdpack
license = GPL3
makedepends = asciidoc
source = https://github.com/chungy/cmdpack/archive/1.06.tar.gz
- sha256sums = 6ce7029c0f2b0fbc6a1e26fb3ad8003ed18836aa3ef35f148ec51cde0b703307
+ source = 0001_symlink-ecm2bin-manpage.patch
+ sha512sums = 3fb1a84c3e6f26f1164be3ad0c60334a9adf6b452af81556473104e560d8a9941478aad0d0fe55753f6489e18464a953895034685a82c170919d27d74384a40f
+ sha512sums = 7f8668fb643b7dcb71b8cdcfe5c07456cdafe40d7b941564c8e463f63a26e9b133534a813e0f8643c1b7409d1a142817a653aebea46baea0e2e4675d5ed3f741
pkgname = cmdpack-bin2ecm
pkgdesc = Encoder/decoder for Error Code Modeler format
provides = ecm-tools
- provides = bin2ecm
- conflicts = ecm-tools
- replaces = ecm-tools
pkgname = cmdpack-bincomp
pkgdesc = Compare binary files
- provides = bincomp
pkgname = cmdpack-brrrip
pkgdesc = Rip SNES BRR sound samples
- provides = brrrip
pkgname = cmdpack-byteshuf
pkgdesc = Shuffle or unshuffle bytes in a file
- provides = byteshuf
pkgname = cmdpack-cdpatch
pkgdesc = CD-XA image insert/extract utility
- provides = cdpatch
pkgname = cmdpack-fakecrc
pkgdesc = Fake the CRC32 of a file
- provides = fakecrc
pkgname = cmdpack-hax65816
pkgdesc = Simple 65816 disassembler
- provides = hax65816
pkgname = cmdpack-pecompat
pkgdesc = Maximize compatibility of a Win32 PE file
- provides = pecompat
pkgname = cmdpack-rels
pkgdesc = Relative Searcher
- provides = rels
pkgname = cmdpack-screamf
pkgdesc = .AMF to .S3M converter
- provides = screamf
pkgname = cmdpack-uips
pkgdesc = Universal IPS patch create/apply utility
- provides = uips
pkgname = cmdpack-vb2rip
pkgdesc = VB2 sound format ripping utility
- provides = vb2rip
pkgname = cmdpack-wordadd
pkgdesc = Addition word puzzle solver
- provides = wordadd
diff --git a/0001_symlink-ecm2bin-manpage.patch b/0001_symlink-ecm2bin-manpage.patch
new file mode 100644
index 00000000000..27b01a48cc0
--- /dev/null
+++ b/0001_symlink-ecm2bin-manpage.patch
@@ -0,0 +1,28 @@
+diff --git a/Makefile b/Makefile
+index ed5bf91..1a7f724 100644
+--- a/Makefile
++++ b/Makefile
+@@ -21,17 +21,14 @@ mandir?=/share/man
+ target=$(DESTDIR)$(prefix)
+
+ install-%: % %.1
+- install -d "$(target)$(bindir)"
+- install -d "$(target)$(mandir)/man1"
+- install $< "$(target)$(bindir)"
+- install -m644 $<.1 "$(target)$(mandir)/man1"
++ install -D $< -t "$(target)$(bindir)"
++ install -Dm644 $<.1 -t "$(target)$(mandir)/man1"
+
+ install-bin2ecm: bin2ecm bin2ecm.1
+- install -d "$(target)$(bindir)"
+- install -d "$(target)$(mandir)/man1"
+- install bin2ecm "$(target)$(bindir)"
+- install -m644 bin2ecm.1 "$(target)$(mandir)/man1"
+- ln -s bin2ecm "$(target)$(bindir)/ecm2bin"
++ install -D bin2ecm -t "$(target)$(bindir)"
++ install -Dm644 bin2ecm.1 -t "$(target)$(mandir)/man1"
++ ln -fs bin2ecm "$(target)$(bindir)/ecm2bin"
++ ln -fs bin2ecm.1 "$(target)$(mandir)/man1/ecm2bin.1"
+
+ install: install-bin2ecm install-bincomp install-brrrip \
+ install-byteshuf install-cdpatch install-fakecrc \
diff --git a/PKGBUILD b/PKGBUILD
index 7b4d4184d05..789f7e45869 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,47 +2,141 @@
# Contributor: Özgür Sarıer <echo b3pndXJzYXJpZXIxMDExNjAxMTE1QGdtYWlsLmNvbQo= | base64 -d>
pkgbase=cmdpack
+pkgname=(cmdpack-bin2ecm cmdpack-bincomp cmdpack-brrrip
+ cmdpack-byteshuf cmdpack-cdpatch cmdpack-fakecrc
+ cmdpack-hax65816 cmdpack-pecompat cmdpack-rels
+ cmdpack-screamf cmdpack-uips cmdpack-vb2rip cmdpack-wordadd)
groups=($pkgbase)
-_utils=('bin2ecm' 'bincomp' 'brrrip' 'byteshuf' 'cdpatch' 'fakecrc'
- 'hax65816' 'pecompat' 'rels' 'screamf' 'uips' 'vb2rip'
- 'wordadd')
-for _tool in ${_utils[@]}; do pkgname+=("$pkgbase-$_tool"); done
pkgver=1.06
-pkgrel=1
-pkgdesc="Collection of command line utilities, most for emulation or disk images. (${_utils[*]})"
+pkgrel=2
+pkgdesc="Collection of command line utilities, most for emulation or disk images. (${pkgname[*]/cmdpack-/})"
arch=('i686' 'x86_64')
url="https://github.com/chungy/cmdpack"
license=('GPL3')
makedepends=('asciidoc')
-source=("$url/archive/$pkgver.tar.gz")
-sha256sums=('6ce7029c0f2b0fbc6a1e26fb3ad8003ed18836aa3ef35f148ec51cde0b703307')
+source=("$url/archive/$pkgver.tar.gz"
+ 0001_symlink-ecm2bin-manpage.patch)
+sha512sums=('3fb1a84c3e6f26f1164be3ad0c60334a9adf6b452af81556473104e560d8a9941478aad0d0fe55753f6489e18464a953895034685a82c170919d27d74384a40f'
+ '7f8668fb643b7dcb71b8cdcfe5c07456cdafe40d7b941564c8e463f63a26e9b133534a813e0f8643c1b7409d1a142817a653aebea46baea0e2e4675d5ed3f741')
+
+prepare() {
+ cd "$pkgbase-$pkgver"
+
+ for patch in ../*.patch; do
+ if [ ! -f "$patch" ]; then
+ break;
+ else
+ patch -p1 -i "$patch"
+ fi
+ done
+}
build() {
cd "$srcdir/$pkgbase-$pkgver"
- make ${_utils[@]} $(for _tool in ${_utils[@]}; do echo $_tool.1; done)
-}
-
-for _tool in "${_utils[@]}"; do
- src_mkdir_eval='mkdir -p ./src/ > /dev/null 2>&1'
- src_ext_ctr_eval='if ! [[ -d "./src/$pkgbase-$pkgver/" ]]; then bsdtar -xf "'$source'" -C ./src/; fi > /dev/null 2>&1'
- pkg_des_c_eval="sed -n 's/\"$//g;s/^#define TITLE \"$_tool - //p' ./src/\$pkgbase-\$pkgver/$_tool.c"
- add_pkg_func="package_$pkgbase-$_tool() {
- cd \${srcdir%/*}/
- provides=('$_tool')
- pkgdesc="\`$src_mkdir_eval\`\`$src_ext_ctr_eval\`\`$pkg_des_c_eval\`"
- cd \${srcdir}/\${pkgbase}-\${pkgver}/
- "
- if [[ "$_tool" == "bin2ecm" ]]; then
- eval "$add_pkg_func
- conflicts=('ecm-tools')
- provides=('ecm-tools' '$_tool')
- replaces=('ecm-tools')
- make DESTDIR=\"\$pkgdir\" prefix=/usr install-$_tool
- }"
- else
- eval "$add_pkg_func
- make DESTDIR=\"\$pkgdir\" prefix=/usr install-$_tool
- }"
+ make ${pkgname[@]/cmdpack-/}
+
+ for _pkg in ${pkgname[@]/cmdpack-/}; do
+ make ${_pkg}.1
+ done
+}
+
+pkgdesc_ext() {
+ if ! [[ -d "$pkgbase-$pkgver" ]]; then
+ bsdtar -xf "$pkgver.tar.gz"
fi
-done
+
+ printf %s "$(sed -n 's/"$//g;s/^#define TITLE "'${1}' - // p' "$pkgbase-$pkgver"/${1}.c)"
+}
+
+package_cmdpack-bin2ecm() {
+ pkgdesc="$(pkgdesc_ext ${pkgname/cmdpack-/})"
+ provides=(ecm-tools)
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ make DESTDIR="$pkgdir" prefix=/usr install-${pkgname/cmdpack-/}
+}
+
+package_cmdpack-bincomp() {
+ pkgdesc="$(pkgdesc_ext ${pkgname/cmdpack-/})"
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ make DESTDIR="$pkgdir" prefix=/usr install-${pkgname/cmdpack-/}
+}
+
+package_cmdpack-brrrip() {
+ pkgdesc="$(pkgdesc_ext ${pkgname/cmdpack-/})"
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ make DESTDIR="$pkgdir" prefix=/usr install-${pkgname/cmdpack-/}
+}
+
+package_cmdpack-byteshuf() {
+ pkgdesc="$(pkgdesc_ext ${pkgname/cmdpack-/})"
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ make DESTDIR="$pkgdir" prefix=/usr install-${pkgname/cmdpack-/}
+}
+
+package_cmdpack-cdpatch() {
+ pkgdesc="$(pkgdesc_ext ${pkgname/cmdpack-/})"
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ make DESTDIR="$pkgdir" prefix=/usr install-${pkgname/cmdpack-/}
+}
+
+package_cmdpack-fakecrc() {
+ pkgdesc="$(pkgdesc_ext ${pkgname/cmdpack-/})"
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ make DESTDIR="$pkgdir" prefix=/usr install-${pkgname/cmdpack-/}
+}
+
+package_cmdpack-hax65816() {
+ pkgdesc="$(pkgdesc_ext ${pkgname/cmdpack-/})"
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ make DESTDIR="$pkgdir" prefix=/usr install-${pkgname/cmdpack-/}
+}
+
+package_cmdpack-pecompat() {
+ pkgdesc="$(pkgdesc_ext ${pkgname/cmdpack-/})"
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ make DESTDIR="$pkgdir" prefix=/usr install-${pkgname/cmdpack-/}
+}
+
+package_cmdpack-rels() {
+ pkgdesc="$(pkgdesc_ext ${pkgname/cmdpack-/})"
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ make DESTDIR="$pkgdir" prefix=/usr install-${pkgname/cmdpack-/}
+}
+
+package_cmdpack-screamf() {
+ pkgdesc="$(pkgdesc_ext ${pkgname/cmdpack-/})"
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ make DESTDIR="$pkgdir" prefix=/usr install-${pkgname/cmdpack-/}
+}
+
+package_cmdpack-uips() {
+ pkgdesc="$(pkgdesc_ext ${pkgname/cmdpack-/})"
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ make DESTDIR="$pkgdir" prefix=/usr install-${pkgname/cmdpack-/}
+}
+
+package_cmdpack-vb2rip() {
+ pkgdesc="$(pkgdesc_ext ${pkgname/cmdpack-/})"
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ make DESTDIR="$pkgdir" prefix=/usr install-${pkgname/cmdpack-/}
+}
+
+package_cmdpack-wordadd() {
+ pkgdesc="$(pkgdesc_ext ${pkgname/cmdpack-/})"
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ make DESTDIR="$pkgdir" prefix=/usr install-${pkgname/cmdpack-/}
+}