# Contributor: Rafal Rzepecki # Maintainer: global pkgname := 'pgagent' global pkgver := '3.4.0' global pkgrel := '0' global pkgdesc := '"a job scheduler for PostgreSQL'" global url := '"http://www.pgadmin.org/docs/dev/pgagent.html'" global arch := '"all'" global license := '"POSTGRESQL'" global depends := '"wxgtk2.8-base postgresql'" global depends_dev := '"wxgtk2.8-dev postgresql-dev'" global makedepends := ""$depends_dev cmake"" global install := ''"" global subpackages := ""$pkgname-doc"" global source := "" https://ftp.postgresql.org/pub/pgadmin3/release/pgagent/pgAgent-$pkgver-Source.tar.gz pgagent.initd pgagent.confd "" global _builddir := ""$srcdir"/pgAgent-$pkgver-Source" proc prepare { var i = '' cd $_builddir for i in [$source] { matchstr $i { *.patch { msg $i; patch -p1 -i "$srcdir"/$i || return 1} } } } proc build { cd $_builddir cmake -DCMAKE_INSTALL_PREFIX=/usr -DSTATIC_BUILD:BOOLEAN=FALSE make || return 1 } proc package { cd $_builddir make DESTDIR="$pkgdir" install # remove useless doc files rm "$pkgdir"/usr/README rm "$pkgdir"/usr/LICENSE install -m755 -D "$srcdir"/$pkgname.initd \ "$pkgdir"/etc/init.d/$pkgname || return 1 install -m644 -D "$srcdir"/$pkgname.confd \ "$pkgdir"/etc/conf.d/$pkgname || return 1 install -Dm644 "$_builddir"/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE install -Dm644 "$_builddir"/README "$pkgdir"/usr/share/doc/$pkgname/README } global md5sums := '"187caa1843f0d82f6caa1be0f80d6232 pgAgent-3.4.0-Source.tar.gz c719d251f7617583864b9b5f7128bf6f pgagent.initd c64e1925e38a93ad66f701d3015ae970 pgagent.confd'" global sha256sums := '"0da0ac8f453cf34ab6f708eee036bed0fd0e5fa311de283b92d2ff06600bbb3d pgAgent-3.4.0-Source.tar.gz b37ac8a8e95144e19c04cc02fd508515b44ef4ac74b2572e48c55d91b04d679f pgagent.initd 2bdf4166ff53c57b382788b89818e6c3298fbaa291092236883bd03e08970d4b pgagent.confd'" global sha512sums := '"3b068fc6f5e51ff20604f8cec3e067d04b5b1537229da15ee442000f5fe834697a4eae86be0e9a58b8ee5da24cc985c8c9804d71cb2a50e93ec4cf9a424a4ff0 pgAgent-3.4.0-Source.tar.gz e84bf6c3a2bb9d2d8afad2dda7ebcac80ede19a5595ccbe31251731917c3f2337ca3fca68bc47ca8f51bb6e765a0c1e54eabf60466a42d1a6938399d13b71a79 pgagent.initd fe9fcdd33225a361cbd007ac5bef439946714da9a990169222b8ba88e63362a753e80490ab9402f146ec6a6782b3457846039cc0ad84bf0cdf0c231deec1c286 pgagent.confd'" (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgname) op:Equal rhs:{(pgagent)} spids:[6])] spids: [6] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgver) op:Equal rhs:{(3.4.0)} spids:[9])] spids: [9] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgrel) op:Equal rhs:{(0)} spids:[12])] spids: [12] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("a job scheduler for PostgreSQL"))} spids: [15] ) ] spids: [15] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("http://www.pgadmin.org/docs/dev/pgagent.html"))} spids: [20] ) ] spids: [20] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ (all))} spids:[25])] spids: [25] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:license) op:Equal rhs:{(DQ (POSTGRESQL))} spids:[30])] spids: [30] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:depends) op: Equal rhs: {(DQ ("wxgtk2.8-base postgresql"))} spids: [35] ) ] spids: [35] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:depends_dev) op: Equal rhs: {(DQ ("wxgtk2.8-dev postgresql-dev"))} spids: [40] ) ] spids: [40] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:makedepends) op: Equal rhs: {(DQ ($ VSub_Name "$depends_dev") (" cmake"))} spids: [45] ) ] spids: [45] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:install) op:Equal rhs:{(DQ )} spids:[51])] spids: [51] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subpackages) op: Equal rhs: {(DQ ($ VSub_Name "$pkgname") (-doc))} spids: [55] ) ] spids: [55] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:source) op: Equal rhs: { (DQ ("\n") ("\thttps://ftp.postgresql.org/pub/pgadmin3/release/pgagent/pgAgent-") ($ VSub_Name "$pkgver") ("-Source.tar.gz\n") ("\tpgagent.initd\n") ("\tpgagent.confd\n") ) } spids: [61] ) ] spids: [61] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_builddir) op: Equal rhs: {(DQ ($ VSub_Name "$srcdir")) (/pgAgent-) ($ VSub_Name "$pkgver") (-Source)} spids: [72] ) ] spids: [72] ) (FuncDef name: prepare body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:i) op:Equal spids:[89])] spids: [87] ) (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)} {(-p1)} {(-i)} {(DQ ($ VSub_Name "$srcdir")) (/) ($ VSub_Name "$i")} ) (ControlFlow token: arg_word: {(1)} ) ] op_id: Op_DPipe ) ] spids: [118 120 144 -1] ) ] spids: [111 115 147] ) ] spids: [108 150] ) spids: [104 106] ) ] spids: [84] ) spids: [80 83] ) (FuncDef name: build body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$_builddir"))}) (C {(cmake)} {(-DCMAKE_INSTALL_PREFIX) (Lit_Other "=") (/usr)} {(-DSTATIC_BUILD) (Lit_Other ":") (Lit_VarLike "BOOLEAN=") (FALSE)} ) (AndOr children: [(C {(make)}) (ControlFlow token: arg_word:{(1)})] op_id: Op_DPipe ) ] spids: [159] ) spids: [155 158] ) (FuncDef name: package body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$_builddir"))}) (C {(make)} {(Lit_VarLike "DESTDIR=") (DQ ($ VSub_Name "$pkgdir"))} {(install)}) (C {(rm)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/README)}) (C {(rm)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/LICENSE)}) (AndOr children: [ (C {(install)} {(-m755)} {(-D)} {(DQ ($ VSub_Name "$srcdir")) (/) ($ VSub_Name "$pkgname") (.initd)} {(DQ ($ VSub_Name "$pkgdir")) (/etc/init.d/) ($ VSub_Name "$pkgname")} ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(install)} {(-m644)} {(-D)} {(DQ ($ VSub_Name "$srcdir")) (/) ($ VSub_Name "$pkgname") (.confd)} {(DQ ($ VSub_Name "$pkgdir")) (/etc/conf.d/) ($ VSub_Name "$pkgname")} ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (C {(install)} {(-Dm644)} {(DQ ($ VSub_Name "$_builddir")) (/LICENSE)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/share/licenses/) ($ VSub_Name "$pkgname") (/LICENSE)} ) (C {(install)} {(-Dm644)} {(DQ ($ VSub_Name "$_builddir")) (/README)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/share/doc/) ($ VSub_Name "$pkgname") (/README)} ) ] spids: [196] ) spids: [192 195] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:md5sums) op: Equal rhs: { (DQ ("187caa1843f0d82f6caa1be0f80d6232 pgAgent-3.4.0-Source.tar.gz\n") ("c719d251f7617583864b9b5f7128bf6f pgagent.initd\n") ("c64e1925e38a93ad66f701d3015ae970 pgagent.confd") ) } spids: [332] ) ] spids: [332] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha256sums) op: Equal rhs: { (DQ ( "0da0ac8f453cf34ab6f708eee036bed0fd0e5fa311de283b92d2ff06600bbb3d pgAgent-3.4.0-Source.tar.gz\n" ) ("b37ac8a8e95144e19c04cc02fd508515b44ef4ac74b2572e48c55d91b04d679f pgagent.initd\n") ("2bdf4166ff53c57b382788b89818e6c3298fbaa291092236883bd03e08970d4b pgagent.confd") ) } spids: [339] ) ] spids: [339] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha512sums) op: Equal rhs: { (DQ ( "3b068fc6f5e51ff20604f8cec3e067d04b5b1537229da15ee442000f5fe834697a4eae86be0e9a58b8ee5da24cc985c8c9804d71cb2a50e93ec4cf9a424a4ff0 pgAgent-3.4.0-Source.tar.gz\n" ) ( "e84bf6c3a2bb9d2d8afad2dda7ebcac80ede19a5595ccbe31251731917c3f2337ca3fca68bc47ca8f51bb6e765a0c1e54eabf60466a42d1a6938399d13b71a79 pgagent.initd\n" ) ( "fe9fcdd33225a361cbd007ac5bef439946714da9a990169222b8ba88e63362a753e80490ab9402f146ec6a6782b3457846039cc0ad84bf0cdf0c231deec1c286 pgagent.confd" ) ) } spids: [346] ) ] spids: [346] ) ] )