# Maintainer: Cameron Banta global pkgname := 'pgcluster' global pkgver := '1.9.00001' global _myver := '1.9.0rc5' global pkgrel := '0' global pkgdesc := '"PostgreSQL with multi-master cluster/replication patch'" global url := '"http://pgfoundry.org/projects/pgcluster/'" global arch := '"all !aarch64'" global license := '"BSD'" global depends := '' global makedepends := '"readline-dev libressl-dev zlib-dev'" global subpackages := ""$pkgname-dev $pkgname-doc $pkgname-libpq $pkgname-client"" global source := ""http://pgfoundry.org/frs/download.php/1705/$pkgname-$_myver.tar.gz musl-fixes.patch $pkgname.initd $pkgname.confd "" test $ALPINE_LIBC = "eglibc" && global arch := '' global _builddir := ""$srcdir/$pkgname-$_myver"" proc prepare { cd $_builddir update_config_sub || return 1 for i in [$source] { matchstr $i { *.patch { msg $i; patch -p1 -i "$srcdir"/$i || return 1} } } } proc build { cd $_builddir ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --mandir=/usr/share/man \ --with-docdir=/usr/share/doc \ --with-openssl \ || return 1 make || return 1 } proc package { cd $_builddir make DESTDIR="$pkgdir" install || return 1 install -D -m755 "$srcdir"/$pkgname.initd \ "$pkgdir"/etc/init.d/$pkgname install -D -m644 "$srcdir"/$pkgname.confd \ "$pkgdir"/etc/conf.d/$pkgname || return 1 } proc libpq { global depends := '' global pkgdesc := '"PGCluster libraries'" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libpq.so* "$subpkgdir"/usr/lib/ } proc client { global depends := '' global pkgdesc := '"PGCluster client'" mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/psql "$subpkgdir"/usr/bin/ } global sha512sums := '"825b3da733c2e455bbdfca5833ec6f874d622529cc70fa6a398db458696d8398aa52101633ea703c698df0c86170b2522bb289ac3888b3f76575781f4a4c0d64 pgcluster-1.9.0rc5.tar.gz e07a310644f6bad61a199c0d16997d2cd5105a81ad92074839c8296f7357e0abd25a17601485f6baf5b62a07e478fda1ceb36ef79dff2341f5b5ea912bd5b17e musl-fixes.patch 32f21e761e963f91bd248f52ecb3c2abb9f0951fd5fb6b29c682ef2825aae2ed37483da728dfb8ce6281305e75568a1eac5037ced04ead604ce1c800695a1b52 pgcluster.initd 2dfa32a7c5fb39bf0fcc91f49a8fa432a983ad7eeecffe969f030e60da6ad5502aba6160daaae19c30c8596aab0ecf246775a53a18acb841c73c409a5a959bb2 pgcluster.confd'" (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgname) op:Equal rhs:{(pgcluster)} spids:[3])] spids: [3] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgver) op:Equal rhs:{(1.9.00001)} spids:[6])] spids: [6] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:_myver) op:Equal rhs:{(1.9.0rc5)} 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 ("PostgreSQL with multi-master cluster/replication patch"))} spids: [15] ) ] spids: [15] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("http://pgfoundry.org/projects/pgcluster/"))} spids: [20] ) ] spids: [20] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ ("all !aarch64"))} spids:[25])] spids: [25] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:license) op:Equal rhs:{(DQ (BSD))} spids:[30])] spids: [30] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:depends) op:Equal rhs:{(SQ )} spids:[35])] spids: [35] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:makedepends) op: Equal rhs: {(DQ ("readline-dev libressl-dev zlib-dev"))} spids: [37] ) ] spids: [37] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subpackages) op: Equal rhs: { (DQ ($ VSub_Name "$pkgname") ("-dev ") ($ VSub_Name "$pkgname") ("-doc ") ($ VSub_Name "$pkgname") ("-libpq ") ($ VSub_Name "$pkgname") (-client) ) } spids: [42] ) ] spids: [42] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:source) op: Equal rhs: { (DQ ("http://pgfoundry.org/frs/download.php/1705/") ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$_myver") (".tar.gz\n") ("\tmusl-fixes.patch\n") ("\t") ($ VSub_Name "$pkgname") (".initd\n") ("\t") ($ VSub_Name "$pkgname") (".confd\n") ("\t") ) } spids: [54] ) ] spids: [54] ) (AndOr children: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$ALPINE_LIBC"))} {(Lit_Other "=")} {(DQ (eglibc))} {(Lit_Other "]")} ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(SQ )} spids:[88])] spids: [88] ) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_builddir) op: Equal rhs: {(DQ ($ VSub_Name "$srcdir") (/) ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$_myver"))} spids: [91] ) ] spids: [91] ) (FuncDef name: prepare body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$_builddir"))}) (AndOr children: [ (C {(update_config_sub)}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (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: [143 145 169 -1] ) ] spids: [136 140 172] ) ] spids: [133 175] ) spids: [129 131] ) ] spids: [105] ) spids: [101 104] ) (FuncDef name: build body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$_builddir"))}) (AndOr children: [ (C {(./configure)} {(--build) (Lit_Other "=") ($ VSub_Name "$CBUILD")} {(--host) (Lit_Other "=") ($ VSub_Name "$CHOST")} {(--prefix) (Lit_Other "=") (/usr)} {(--mandir) (Lit_Other "=") (/usr/share/man)} {(--with-docdir) (Lit_Other "=") (/usr/share/doc)} {(--with-openssl)} ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (AndOr children: [(C {(make)}) (ControlFlow token: arg_word:{(1)})] op_id: Op_DPipe ) ] spids: [184] ) spids: [180 183] ) (FuncDef name: package body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$_builddir"))}) (AndOr children: [ (C {(make)} {(Lit_VarLike "DESTDIR=") (DQ ($ VSub_Name "$pkgdir"))} {(install)}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (C {(install)} {(-D)} {(-m755)} {(DQ ($ VSub_Name "$srcdir")) (/) ($ VSub_Name "$pkgname") (.initd)} {(DQ ($ VSub_Name "$pkgdir")) (/etc/init.d/) ($ VSub_Name "$pkgname")} ) (AndOr children: [ (C {(install)} {(-D)} {(-m644)} {(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 ) ] spids: [255] ) spids: [251 254] ) (FuncDef name: libpq body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:depends) op:Equal rhs:{(SQ )} spids:[341])] spids: [341] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("PGCluster libraries"))} spids: [344] ) ] spids: [344] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/lib)}) (C {(mv)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/lib/libpq.so) (Lit_Other "*")} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/lib/)} ) ] spids: [338] ) spids: [334 337] ) (FuncDef name: client body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:depends) op:Equal rhs:{(SQ )} spids:[383])] spids: [383] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("PGCluster client"))} spids: [386] ) ] spids: [386] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin)}) (C {(mv)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/bin/psql)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin/)} ) ] spids: [380] ) spids: [376 379] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha512sums) op: Equal rhs: { (DQ ( "825b3da733c2e455bbdfca5833ec6f874d622529cc70fa6a398db458696d8398aa52101633ea703c698df0c86170b2522bb289ac3888b3f76575781f4a4c0d64 pgcluster-1.9.0rc5.tar.gz\n" ) ( "e07a310644f6bad61a199c0d16997d2cd5105a81ad92074839c8296f7357e0abd25a17601485f6baf5b62a07e478fda1ceb36ef79dff2341f5b5ea912bd5b17e musl-fixes.patch\n" ) ( "32f21e761e963f91bd248f52ecb3c2abb9f0951fd5fb6b29c682ef2825aae2ed37483da728dfb8ce6281305e75568a1eac5037ced04ead604ce1c800695a1b52 pgcluster.initd\n" ) ( "2dfa32a7c5fb39bf0fcc91f49a8fa432a983ad7eeecffe969f030e60da6ad5502aba6160daaae19c30c8596aab0ecf246775a53a18acb841c73c409a5a959bb2 pgcluster.confd" ) ) } spids: [418] ) ] spids: [418] ) ] )