# Maintainer: Natanael Copa global pkgname := 'lua-mosquitto' global pkgver := '0.2' global pkgrel := '1' global pkgdesc := '"Bindingd to libmosquitto for Lua'" global url := '"https://github.com/flukso/lua-mosquitto'" global arch := '"all'" global license := '"MIT'" global depends := ''"" global makedepends := '"mosquitto-dev'" global subpackages := ''"" global source := ""$pkgname-$pkgver.tar.gz::https://github.com/flukso/$pkgname/archive/v$pkgver.tar.gz"" global builddir := ""$srcdir/$pkgname-$pkgver"" global _luaversions := '"5.1 5.2 5.3'" for _v in [$_luaversions] { global makedepends := ""$makedepends lua$_v-dev"" global subpackages := ""$subpackages lua$_v-$(pkgname#lua-):_package"" } proc prepare { default_prepare || return 1 var lver = ''; for lver in [$_luaversions] { cp -r $builddir "$builddir-$lver" || return 1 } } proc build { var lver = ''; for lver in [$_luaversions] { msg "Building for Lua $lver..." make -C "$builddir-$lver" LUAPKGC=lua$lver || return 1 } } proc package { mkdir -p $pkgdir } proc _package { var lver = $(subpkgname:3:3) global pkgdesc := ""$pkgdesc $lver"" global depends := ""lua$lver"" global install_if := ""$pkgname=$pkgver-r$pkgrel lua$lver"" var rockdir = ""$subpkgdir/usr/lib/luarocks/rocks-$lver/$pkgname/$pkgver-1"" cd "$builddir-$lver" make install DESTDIR="$subpkgdir" \ LUA_LIBDIR=/usr/lib \ LUAPKGC=lua$lver mkdir -p $rockdir echo 'rock_manifest = {}' > "$rockdir"/rock_manifest } global md5sums := '"4954191018ad2cfed6273e2547750e6c lua-mosquitto-0.2.tar.gz'" global sha256sums := '"1468e82e3ddb52fe68d042b2b5ae704f3a794184165f59743acc8ff6ed805703 lua-mosquitto-0.2.tar.gz'" global sha512sums := '"02a96ede4ac594ef9bcb838816f55e6f4c5fe8daaad21e2fd8d123a307f326ec599f42fe6e56527e0da195883c73fec945fde77bc07f69f85840871a5f1c9490 lua-mosquitto-0.2.tar.gz'" (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgname) op:Equal rhs:{(lua-mosquitto)} spids:[3])] spids: [3] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgver) op:Equal rhs:{(0.2)} spids:[6])] spids: [6] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgrel) op:Equal rhs:{(1)} spids:[9])] spids: [9] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Bindingd to libmosquitto for Lua"))} spids: [12] ) ] spids: [12] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("https://github.com/flukso/lua-mosquitto"))} spids: [17] ) ] spids: [17] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ (all))} spids:[22])] spids: [22] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:license) op:Equal rhs:{(DQ (MIT))} spids:[27])] spids: [27] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:depends) op:Equal rhs:{(DQ )} spids:[32])] spids: [32] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:makedepends) op: Equal rhs: {(DQ (mosquitto-dev))} spids: [36] ) ] spids: [36] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:subpackages) op:Equal rhs:{(DQ )} spids:[41])] spids: [41] ) (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/flukso/") ($ VSub_Name "$pkgname") (/archive/v) ($ VSub_Name "$pkgver") (.tar.gz) ) } spids: [45] ) ] spids: [45] ) (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: [57] ) ] spids: [57] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_luaversions) op: Equal rhs: {(DQ ("5.1 5.2 5.3"))} spids: [67] ) ] spids: [67] ) (ForEach iter_name: _v iter_words: [{($ VSub_Name "$_luaversions")}] do_arg_iter: False body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:makedepends) op: Equal rhs: {(DQ ($ VSub_Name "$makedepends") (" lua") ($ VSub_Name "$_v") (-dev))} spids: [84] ) ] spids: [84] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subpackages) op: Equal rhs: { (DQ ($ VSub_Name "$subpackages") (" lua") ($ VSub_Name "$_v") (-) (BracedVarSub token: suffix_op: (StringUnary op_id:VOp1_Pound arg_word:{(lua-)}) spids: [99 103] ) (":_package") ) } spids: [93] ) ] spids: [93] ) ] spids: [81 107] ) spids: [77 79] ) (FuncDef name: prepare body: (BraceGroup children: [ (AndOr children: [ (C {(default_prepare)}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (Sentence child: (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:lver) op:Equal spids:[129])] spids: [127] ) terminator: ) (ForEach iter_name: lver iter_words: [{($ VSub_Name "$_luaversions")}] do_arg_iter: False body: (DoGroup children: [ (AndOr children: [ (C {(cp)} {(-r)} {(DQ ($ VSub_Name "$builddir"))} {(DQ ($ VSub_Name "$builddir") (-) ($ VSub_Name "$lver"))} ) (ControlFlow token: arg_word: {(1)} ) ] op_id: Op_DPipe ) ] spids: [141 165] ) spids: [137 139] ) ] spids: [114] ) spids: [110 113] ) (FuncDef name: build body: (BraceGroup children: [ (Sentence child: (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:lver) op:Equal spids:[179])] spids: [177] ) terminator: ) (ForEach iter_name: lver iter_words: [{($ VSub_Name "$_luaversions")}] do_arg_iter: False body: (DoGroup children: [ (C {(msg)} {(DQ ("Building for Lua ") ($ VSub_Name "$lver") (...))}) (AndOr children: [ (C {(make)} {(-C)} {(DQ ($ VSub_Name "$builddir") (-) ($ VSub_Name "$lver"))} {(Lit_VarLike "LUAPKGC=") (lua) ($ VSub_Name "$lver")} ) (ControlFlow token: arg_word: {(1)} ) ] op_id: Op_DPipe ) ] spids: [191 224] ) spids: [187 189] ) ] spids: [174] ) spids: [170 173] ) (FuncDef name: package body: (BraceGroup children:[(C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$pkgdir"))})] spids:[233]) spids: [229 232] ) (FuncDef name: _package body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:lver) op: Equal rhs: { (DQ (BracedVarSub token: suffix_op: (Slice begin: (ArithWord w:{(Lit_Digits 3)}) length: (ArithWord w:{(Lit_Digits 3)}) ) spids: [258 264] ) ) } spids: [256] ) ] spids: [254] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ($ VSub_Name "$pkgdesc") (" ") ($ VSub_Name "$lver"))} spids: [268] ) ] spids: [268] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:depends) op: Equal rhs: {(DQ (lua) ($ VSub_Name "$lver"))} spids: [276] ) ] spids: [276] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:install_if) op: Equal rhs: { (DQ ($ VSub_Name "$pkgname") ("=") ($ VSub_Name "$pkgver") (-r) ($ VSub_Name "$pkgrel") (" lua") ($ VSub_Name "$lver") ) } spids: [283] ) ] spids: [283] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:rockdir) op: Equal rhs: { (DQ ($ VSub_Name "$subpkgdir") (/usr/lib/luarocks/rocks-) ($ VSub_Name "$lver") (/) ($ VSub_Name "$pkgname") (/) ($ VSub_Name "$pkgver") (-1) ) } spids: [297] ) ] spids: [295] ) (C {(cd)} {(DQ ($ VSub_Name "$builddir") (-) ($ VSub_Name "$lver"))}) (C {(make)} {(install)} {(Lit_VarLike "DESTDIR=") (DQ ($ VSub_Name "$subpkgdir"))} {(Lit_VarLike "LUA_LIBDIR=") (/usr/lib)} {(Lit_VarLike "LUAPKGC=") (lua) ($ VSub_Name "$lver")} ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$rockdir"))}) (SimpleCommand words: [{(echo)} {(SQ <"rock_manifest = {}">)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(DQ ($ VSub_Name "$rockdir")) (/rock_manifest)} spids: [357] ) ] ) ] spids: [251] ) spids: [247 250] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:md5sums) op: Equal rhs: {(DQ ("4954191018ad2cfed6273e2547750e6c lua-mosquitto-0.2.tar.gz"))} spids: [367] ) ] spids: [367] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha256sums) op: Equal rhs: { (DQ ( "1468e82e3ddb52fe68d042b2b5ae704f3a794184165f59743acc8ff6ed805703 lua-mosquitto-0.2.tar.gz" ) ) } spids: [372] ) ] spids: [372] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha512sums) op: Equal rhs: { (DQ ( "02a96ede4ac594ef9bcb838816f55e6f4c5fe8daaad21e2fd8d123a307f326ec599f42fe6e56527e0da195883c73fec945fde77bc07f69f85840871a5f1c9490 lua-mosquitto-0.2.tar.gz" ) ) } spids: [377] ) ] spids: [377] ) ] )