# Contributor: Fabian Affolter # Maintainer: Fabian Affolter global pkgname := 'halberd' global pkgver := '0.2.4' global pkgrel := '1' global pkgdesc := '"Tool to discover HTTP load balancers'" global url := '"http://halberd.superadditive.com'" global arch := '"noarch'" global license := '"GPL2+'" global depends := '"python2'" global depends_dev := ''"" global makedepends := '"python2-dev help2man'" global install := ''"" global subpackages := ""$pkgname-doc"" global source := ""$pkgname-$pkgver.tar.gz::https://github.com/jmbr/$pkgname/archive/$pkgver.tar.gz $pkgname-sslwrap.patch fix-script-include.patch"" global _builddir := ""$srcdir"/$pkgname-$pkgver" proc prepare { var i = '' cd $_builddir for i in [$source] { matchstr $i { *.patch { msg $i; patch -p0 -i "$srcdir"/$i || return 1} } } } proc build { cd $_builddir python2 setup.py build || return 1 mkdir -p $_builddir/man/man1 help2man --include $_builddir/help2man.cfg --no-info $_builddir/scripts/halberd --output $_builddir/man/man1/halberd.1 } proc package { cd $_builddir python2 setup.py bdist_dumb --keep-temp --bdist-dir $pkgdir || return 1 } proc doc { # The man page is not picked-up automatically mkdir -p "$subpkgdir"/usr/share/man || return 1 mv "$_builddir"/man/ "$subpkgdir"/usr/share/ || return 1 default_doc } global md5sums := '"8cd4e14ce84e5fb9f9f435145792c601 halberd-0.2.4.tar.gz a46227da33465e246017c8ec4650d76f halberd-sslwrap.patch 71e41dc35b55ef7ec60befe465e150c1 fix-script-include.patch'" global sha256sums := '"744a9efb1acddb3aedb3e2889a2a4c6461ffbf57adf84421022b7ab47ef12fa6 halberd-0.2.4.tar.gz 6541afcd3d5bd1f7eb37683f81242986ea8e1db73f5a7dc732bfe89373fa3249 halberd-sslwrap.patch 3627f2b5a1384fa797ce2cca4b6935353b6bf211fe06928c139fe4bf088f2650 fix-script-include.patch'" global sha512sums := '"133eb683f46a078b45023198746c583ae96cd54b75eedbc46a3d49675307927a7d9f05383e312b589fa5efe79e68c75fcd1d31649df2852ca27cc5d30c307672 halberd-0.2.4.tar.gz 8ee49b553301f36fb22c88b07b0c6306d12fabb3074382cdac5b7203a58c21a225330a40b11eba518fbd1377f4a6370285736aeaf6c8807f84e77086c5b1754a halberd-sslwrap.patch 24288ba822b33a55cd2a69ca1cfa18241f6bf937fd73e5edc0f9f78b6f49c137869bf064ab6574b1c9a17cf32edf1b8e04abc58f1c5610e0cdf534118c13f5b8 fix-script-include.patch'" (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgname) op:Equal rhs:{(halberd)} spids:[6])] spids: [6] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgver) op:Equal rhs:{(0.2.4)} spids:[9])] spids: [9] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgrel) op:Equal rhs:{(1)} spids:[12])] spids: [12] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Tool to discover HTTP load balancers"))} spids: [15] ) ] spids: [15] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("http://halberd.superadditive.com"))} spids: [20] ) ] spids: [20] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ (noarch))} spids:[25])] spids: [25] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:license) op:Equal rhs:{(DQ ("GPL2+"))} spids:[30])] spids: [30] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:depends) op:Equal rhs:{(DQ (python2))} spids:[35])] spids: [35] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:depends_dev) op:Equal rhs:{(DQ )} spids:[40])] spids: [40] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:makedepends) op: Equal rhs: {(DQ ("python2-dev help2man"))} spids: [44] ) ] spids: [44] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:install) op:Equal rhs:{(DQ )} spids:[49])] spids: [49] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subpackages) op: Equal rhs: {(DQ ($ VSub_Name "$pkgname") (-doc))} spids: [53] ) ] spids: [53] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:source) op: Equal rhs: { (DQ ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver") (".tar.gz::https://github.com/jmbr/") ($ VSub_Name "$pkgname") (/archive/) ($ VSub_Name "$pkgver") (".tar.gz\n") ("\t\t") ($ VSub_Name "$pkgname") ("-sslwrap.patch\n") ("\t\tfix-script-include.patch") ) } spids: [59] ) ] spids: [59] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_builddir) op: Equal rhs: {(DQ ($ VSub_Name "$srcdir")) (/) ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver")} spids: [76] ) ] spids: [76] ) (FuncDef name: prepare body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:i) op:Equal spids:[94])] spids: [92] ) (C {(cd)} {(DQ ($ VSub_Name "$_builddir"))}) (ForEach iter_name: i iter_words: [{($ VSub_Name "$source")}] do_arg_iter: False body: (DoGroup children: [ (Case to_match: {($ VSub_Name "$i")} arms: [ (case_arm pat_list: [{(Lit_Other "*") (.patch)}] action: [ (Sentence child: (C {(msg)} {($ VSub_Name "$i")}) terminator: ) (AndOr children: [ (C {(patch)} {(-p0)} {(-i)} {(DQ ($ VSub_Name "$srcdir")) (/) ($ VSub_Name "$i")} ) (ControlFlow token: arg_word: {(1)} ) ] op_id: Op_DPipe ) ] spids: [123 125 149 -1] ) ] spids: [116 120 152] ) ] spids: [113 155] ) spids: [109 111] ) ] spids: [89] ) spids: [85 88] ) (FuncDef name: build body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$_builddir"))}) (AndOr children: [ (C {(python2)} {(setup.py)} {(build)}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (C {(mkdir)} {(-p)} {($ VSub_Name "$_builddir") (/man/man1)}) (C {(help2man)} {(--include)} {($ VSub_Name "$_builddir") (/help2man.cfg)} {(--no-info)} {($ VSub_Name "$_builddir") (/scripts/halberd)} {(--output)} {($ VSub_Name "$_builddir") (/man/man1/halberd.1)} ) ] spids: [164] ) spids: [160 163] ) (FuncDef name: package body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$_builddir"))}) (AndOr children: [ (C {(python2)} {(setup.py)} {(bdist_dumb)} {(--keep-temp)} {(--bdist-dir)} {(DQ ($ VSub_Name "$pkgdir"))} ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) ] spids: [220] ) spids: [216 219] ) (FuncDef name: doc body: (BraceGroup children: [ (AndOr children: [ (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/share/man)}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(mv)} {(DQ ($ VSub_Name "$_builddir")) (/man/)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/share/)} ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (C {(default_doc)}) ] spids: [257] ) spids: [253 256] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:md5sums) op: Equal rhs: { (DQ ("8cd4e14ce84e5fb9f9f435145792c601 halberd-0.2.4.tar.gz\n") ("a46227da33465e246017c8ec4650d76f halberd-sslwrap.patch\n") ("71e41dc35b55ef7ec60befe465e150c1 fix-script-include.patch") ) } spids: [303] ) ] spids: [303] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha256sums) op: Equal rhs: { (DQ ( "744a9efb1acddb3aedb3e2889a2a4c6461ffbf57adf84421022b7ab47ef12fa6 halberd-0.2.4.tar.gz\n" ) ("6541afcd3d5bd1f7eb37683f81242986ea8e1db73f5a7dc732bfe89373fa3249 halberd-sslwrap.patch\n") ( "3627f2b5a1384fa797ce2cca4b6935353b6bf211fe06928c139fe4bf088f2650 fix-script-include.patch" ) ) } spids: [310] ) ] spids: [310] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha512sums) op: Equal rhs: { (DQ ( "133eb683f46a078b45023198746c583ae96cd54b75eedbc46a3d49675307927a7d9f05383e312b589fa5efe79e68c75fcd1d31649df2852ca27cc5d30c307672 halberd-0.2.4.tar.gz\n" ) ( "8ee49b553301f36fb22c88b07b0c6306d12fabb3074382cdac5b7203a58c21a225330a40b11eba518fbd1377f4a6370285736aeaf6c8807f84e77086c5b1754a halberd-sslwrap.patch\n" ) ( "24288ba822b33a55cd2a69ca1cfa18241f6bf937fd73e5edc0f9f78b6f49c137869bf064ab6574b1c9a17cf32edf1b8e04abc58f1c5610e0cdf534118c13f5b8 fix-script-include.patch" ) ) } spids: [317] ) ] spids: [317] ) ] )