# Maintainer: Natanael Copa global pkgname := 'apcupsd' global pkgver := '3.14.14' global pkgrel := '0' global pkgdesc := '"A Daemon to control APC UPSes'" global subpackages := ""$pkgname-doc $pkgname-webif"" global url := '"http://www.apcupsd.org'" global arch := '"all'" global license := '"GPL2'" global depends := '"util-linux'" global makedepends := '"net-snmp-dev man linux-headers gd-dev'" global source := ""http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz apcupsd.initd apcupsd-alpine.patch "" global _builddir := ""$srcdir/$pkgname-$pkgver"" proc prepare { cd $_builddir update_config_sub || return 1 } proc build { cd $_builddir patch -p1 < ../apcupsd-alpine.patch || return 1 export CHARSET="ISO8859-1" export LANG="C" env ac_cv_path_SHUTDOWN="/sbin/poweroff" \ ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --mandir=/usr/share/man \ --enable-usb \ --enable-snmp \ --enable-cgi \ || return 1 make || return 1 } proc package { cd $_builddir make DESTDIR=$pkgdir install || return 1 install -D -m755 "$srcdir"/apcupsd.initd "$pkgdir"/etc/init.d/apcupsd } proc webif { cd $_builddir mkdir -p "$subpkgdir"/usr/share/webapps/apcupsd mv "$pkgdir"/etc/apcupsd/*.cgi "$subpkgdir"/usr/share/webapps/apcupsd } global md5sums := '"cc8f5ced77f38906a274787acb9bc980 apcupsd-3.14.14.tar.gz 72f6a0392cef1120b88233c5a7266bd0 apcupsd.initd e22bd5b8361faca0f4d1a1a508c7a906 apcupsd-alpine.patch'" global sha256sums := '"db7748559b6b4c3784f9856561ef6ac6199ef7bd019b3edcd7e0a647bf8f9867 apcupsd-3.14.14.tar.gz c9bf632a83228966d4ecc268c4ab5e20b2cd4100c1100f3ecb11d2c8efacc1c4 apcupsd.initd e2ff324b94e80b701e2cba36226706653829d46535f41b5bd9b2ffd2fb705681 apcupsd-alpine.patch'" global sha512sums := '"c953bbf3e08f809748a7978a3952604176390d1cd276f187fe096d9bc3c8993b52127e8350c0363387da41318e24b4d1e00ea58df71f3bb8f50c9a5a64cd2d7f apcupsd-3.14.14.tar.gz cd9cb3c812dfd72660007807965cac866dfb2ce4bd8200668f08e94fdcce874cce2ec87a0d832b8f37f254908d093aff0cc2db26e9403d5e613dc192072da617 apcupsd.initd 4f0712519213c4ef14f41eeef681c5498fac7bf42f205de8a855938f8e834d9488d86820d7c883e89d0d305ee287e17e2d321dbbc98ae12f8487bf58aa0d4a6b apcupsd-alpine.patch'" (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgname) op:Equal rhs:{(apcupsd)} spids:[3])] spids: [3] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgver) op:Equal rhs:{(3.14.14)} spids:[6])] spids: [6] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgrel) op:Equal rhs:{(0)} spids:[9])] spids: [9] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("A Daemon to control APC UPSes"))} spids: [12] ) ] spids: [12] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subpackages) op: Equal rhs: {(DQ ($ VSub_Name "$pkgname") ("-doc ") ($ VSub_Name "$pkgname") (-webif))} spids: [17] ) ] spids: [17] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("http://www.apcupsd.org"))} spids: [25] ) ] spids: [25] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ (all))} spids:[30])] spids: [30] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:license) op:Equal rhs:{(DQ (GPL2))} spids:[35])] spids: [35] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:depends) op:Equal rhs:{(DQ (util-linux))} spids:[40])] spids: [40] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:makedepends) op: Equal rhs: {(DQ ("net-snmp-dev man linux-headers gd-dev"))} spids: [45] ) ] spids: [45] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:source) op: Equal rhs: { (DQ ("http://downloads.sourceforge.net/") ($ VSub_Name "$pkgname") (/) ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver") (".tar.gz\n") ("\tapcupsd.initd\n") ("\tapcupsd-alpine.patch\n") ("\t") ) } spids: [50] ) ] spids: [50] ) (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: [65] ) ] spids: [65] ) (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 ) ] spids: [78] ) spids: [74 77] ) (FuncDef name: build body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$_builddir"))}) (AndOr children: [ (SimpleCommand words: [{(patch)} {(-p1)}] redirects: [ (Redir op_id: Redir_Less fd: -1 arg_word: {(../apcupsd-alpine.patch)} spids: [117] ) ] ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (C {(export)} {(Lit_VarLike "CHARSET=") (DQ (ISO8859-1))}) (C {(export)} {(Lit_VarLike "LANG=") (DQ (C))}) (AndOr children: [ (SimpleCommand words: [ {(./configure)} {(--build) (Lit_Other "=") ($ VSub_Name "$CBUILD")} {(--host) (Lit_Other "=") ($ VSub_Name "$CHOST")} {(--prefix) (Lit_Other "=") (/usr)} {(--mandir) (Lit_Other "=") (/usr/share/man)} {(--enable-usb)} {(--enable-snmp)} {(--enable-cgi)} ] more_env: [ (env_pair name: ac_cv_path_SHUTDOWN val: {(DQ (/sbin/poweroff))} spids: [146] ) ] ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (AndOr children: [(C {(make)}) (ControlFlow token: arg_word:{(1)})] op_id: Op_DPipe ) ] spids: [103] ) spids: [99 102] ) (FuncDef name: package body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$_builddir"))}) (AndOr children: [ (C {(make)} {(Lit_VarLike "DESTDIR=") ($ VSub_Name "$pkgdir")} {(install)}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (C {(install)} {(-D)} {(-m755)} {(DQ ($ VSub_Name "$srcdir")) (/apcupsd.initd)} {(DQ ($ VSub_Name "$pkgdir")) (/etc/init.d/apcupsd)} ) ] spids: [215] ) spids: [211 214] ) (FuncDef name: webif body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$_builddir"))}) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/share/webapps/apcupsd)}) (C {(mv)} {(DQ ($ VSub_Name "$pkgdir")) (/etc/apcupsd/) (Lit_Other "*") (.cgi)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/share/webapps/apcupsd)} ) ] spids: [262] ) spids: [258 261] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:md5sums) op: Equal rhs: { (DQ ("cc8f5ced77f38906a274787acb9bc980 apcupsd-3.14.14.tar.gz\n") ("72f6a0392cef1120b88233c5a7266bd0 apcupsd.initd\n") ("e22bd5b8361faca0f4d1a1a508c7a906 apcupsd-alpine.patch") ) } spids: [299] ) ] spids: [299] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha256sums) op: Equal rhs: { (DQ ( "db7748559b6b4c3784f9856561ef6ac6199ef7bd019b3edcd7e0a647bf8f9867 apcupsd-3.14.14.tar.gz\n" ) ("c9bf632a83228966d4ecc268c4ab5e20b2cd4100c1100f3ecb11d2c8efacc1c4 apcupsd.initd\n") ( "e2ff324b94e80b701e2cba36226706653829d46535f41b5bd9b2ffd2fb705681 apcupsd-alpine.patch" ) ) } spids: [306] ) ] spids: [306] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha512sums) op: Equal rhs: { (DQ ( "c953bbf3e08f809748a7978a3952604176390d1cd276f187fe096d9bc3c8993b52127e8350c0363387da41318e24b4d1e00ea58df71f3bb8f50c9a5a64cd2d7f apcupsd-3.14.14.tar.gz\n" ) ( "cd9cb3c812dfd72660007807965cac866dfb2ce4bd8200668f08e94fdcce874cce2ec87a0d832b8f37f254908d093aff0cc2db26e9403d5e613dc192072da617 apcupsd.initd\n" ) ( "4f0712519213c4ef14f41eeef681c5498fac7bf42f205de8a855938f8e834d9488d86820d7c883e89d0d305ee287e17e2d321dbbc98ae12f8487bf58aa0d4a6b apcupsd-alpine.patch" ) ) } spids: [313] ) ] spids: [313] ) ] )