diff options
author | James An | 2015-12-23 01:27:37 -0500 |
---|---|---|
committer | James An | 2015-12-23 01:27:37 -0500 |
commit | 7b2110755358e87d5342572726853a6edaebff25 (patch) | |
tree | 4cc62ade13881f98a6f0f0a2086e2b0de973e32f | |
download | aur-7b2110755358e87d5342572726853a6edaebff25.tar.gz |
Initial commit with working PKGBUILD.
-rw-r--r-- | .SRCINFO | 20 | ||||
-rwxr-xr-x | .gitignore | 27 | ||||
-rw-r--r-- | PKGBUILD | 29 | ||||
-rw-r--r-- | typecast-pointer.patch | 31 |
4 files changed, 107 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f4da2cc1406e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +# Generated by mksrcinfo v8 +# Wed Dec 23 06:27:09 UTC 2015 +pkgbase = pbzx-stream-parser + pkgdesc = Parse and unpack OS X Installer .pkg packages. + pkgver = 20140623 + pkgrel = 1 + url = http://www.tonymacx86.com/general-help/135458-pbzx-stream-parser.html + arch = i686 + arch = x86_64 + license = GPL3 + makedepends = recode + depends = libxml2 + depends = xar + source = pbzx-stream-parser.html::http://www.tonymacx86.com/general-help/135458-pbzx-stream-parser.html + source = typecast-pointer.patch + md5sums = SKIP + md5sums = 332c6a07c8d494e17c9dc293b877bb6c + +pkgname = pbzx-stream-parser + diff --git a/.gitignore b/.gitignore new file mode 100755 index 000000000000..43316bc3c124 --- /dev/null +++ b/.gitignore @@ -0,0 +1,27 @@ +# From: https://github.com/github/gitignore/blob/master/ArchLinuxPackages.gitignore + +*.tar +*.tar.* +*.zip +*.tgz +*.log +*.log.* +*.sig + +# makepkg working folders +pkg +src + +# +# Additional ignore patterns: +# + +# Source files +*.deb +*.gem +*.out +*.rpm +*.html + +# Ignore package source folders +*/* diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..2daaf08d1ab9 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,29 @@ +# Maintainer: James An <james@jamesan.ca> + +pkgname=pbzx-stream-parser +pkgver=20140623 +pkgrel=1 +pkgdesc="Parse and unpack OS X Installer .pkg packages." +arch=('i686' 'x86_64') +url="http://www.tonymacx86.com/general-help/135458-$pkgname.html" +license=('GPL3') +depends=('libxml2' 'xar') +makedepends=('recode') +source=("$pkgname.html"::"http://www.tonymacx86.com/general-help/135458-pbzx-stream-parser.html" + typecast-pointer.patch) +md5sums=('SKIP' # The HTML file has a current timestamp in it, so its checksum changes every second. + '332c6a07c8d494e17c9dc293b877bb6c') + +prepare() { + sed -n '/bbcode_code/,/}<\/pre>/{s/\s*<[^>]*>\s*//;p}' "$pkgname.html" | recode html..ascii >| main.c + echo '' >> main.c + patch -i typecast-pointer.patch +} + +build() { + g++ -o pbzx main.c -I/usr/include/xar -lxar $(pkg-config liblzma --cflags --libs) +} + +package() { + install -Dm755 pbzx "$pkgdir/usr/bin/pbzx" +} diff --git a/typecast-pointer.patch b/typecast-pointer.patch new file mode 100644 index 000000000000..7a4ba1470517 --- /dev/null +++ b/typecast-pointer.patch @@ -0,0 +1,31 @@ +*** main.c 2015-12-22 23:20:17.238017267 -0500 +--- main.c~ 2015-12-22 23:18:44.111994162 -0500 +*************** +*** 41,47 **** + {
+
+ // insert code here...
+! char xbuf[XBSZ], *zbuf = malloc(ZBSZ);
+ xar_t x;
+ err(argc < 2, "No file specified");
+ err(!(x = xar_open(argv[1], READ)), "XAR open failure");
+--- 41,47 ---- + {
+
+ // insert code here...
+! char xbuf[XBSZ], *zbuf = (char*) malloc(ZBSZ);
+ xar_t x;
+ err(argc < 2, "No file specified");
+ err(!(x = xar_open(argv[1], READ)), "XAR open failure");
+*************** +*** 90,94 **** + lzma_end(&zs);
+ xar_close(x);
+ return 0;
+! } +! +--- 90,93 ---- + lzma_end(&zs);
+ xar_close(x);
+ return 0;
+! }
|