# Maintainer: Natanael Copa global pkgname := 'newt' global pkgver := '0.52.20' global pkgrel := '0' global pkgdesc := '"Redhat's Newt windowing toolkit development files'" global url := '"https://pagure.io/newt/'" global arch := '"all'" global license := '"LGPL2'" global makedepends := '"slang-dev popt-dev python2-dev python3-dev ncurses-dev'" global subpackages := ""$pkgname-dev $pkgname-doc py-newt:py2 py3-newt:py3 $pkgname-lang"" global source := ""https://releases.pagure.org/newt/newt-$pkgver.tar.gz parallel-build.patch fix-includes.patch"" global builddir := ""$srcdir/$pkgname-$pkgver"" proc prepare { cd $builddir sed -i -e 's:-lslang:-lslang -lncurses:g' \ -e 's:instroot:DESTDIR:g' Makefile.in } proc build { cd $builddir ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --without-tcl \ --disable-nls \ || return 1 make RPM_OPT_FLAGS="$CFLAGS" } proc package { cd $builddir # TODO: fix the make install target to not try install po files make -j1 DESTDIR="$pkgdir" prefix="/usr" RPM_OPT_FLAGS="ERROR" install \ || true } proc py2 { global pkgdesc := '"A NEWT module for Python2'" mkdir -p "$subpkgdir"/usr/lib/ mv "$pkgdir"/usr/lib/python2.7 "$subpkgdir"/usr/lib/ } proc py3 { global pkgdesc := '"A NEWT module for Python3'" mkdir -p "$subpkgdir"/usr/lib/ mv "$pkgdir"/usr/lib/python3.6 "$subpkgdir"/usr/lib/ } global sha512sums := '"0c10c373c6a5299a85fc38f32d3590fff3b26c4be40e6c85ed73c20724ef2fb094bf37a8c3b1b80a4bcdfc14fe59254d4419c391245c298a4e16788954b88236 newt-0.52.20.tar.gz ea3937142ce776b6c227936e87f7bc28116ab7775db5785600e39bee38eba914d3ccae1ecb54d9f4ac9505918da255d69a777b105d80d72cd087545b1dae18bc parallel-build.patch ce53446eb587b79790f12f806f02999568cb49067520813ab146d1f16c71f009e86ab72d08666e483b550fdae3332b673935b8aa1a14b02f5273217fb5404611 fix-includes.patch'" (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgname) op:Equal rhs:{(newt)} spids:[3])] spids: [3] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgver) op:Equal rhs:{(0.52.20)} 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 ("Redhat's Newt windowing toolkit development files"))} spids: [12] ) ] spids: [12] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("https://pagure.io/newt/"))} 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 (LGPL2))} spids:[27])] spids: [27] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:makedepends) op: Equal rhs: {(DQ ("slang-dev popt-dev python2-dev python3-dev ncurses-dev"))} spids: [32] ) ] spids: [32] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subpackages) op: Equal rhs: { (DQ ($ VSub_Name "$pkgname") ("-dev ") ($ VSub_Name "$pkgname") ("-doc py-newt:py2 py3-newt:py3 ") ($ VSub_Name "$pkgname") (-lang) ) } spids: [37] ) ] spids: [37] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:source) op: Equal rhs: { (DQ ("https://releases.pagure.org/newt/newt-") ($ VSub_Name "$pkgver") (".tar.gz\n") ("\tparallel-build.patch\n") ("\tfix-includes.patch") ) } spids: [47] ) ] spids: [47] ) (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] ) (FuncDef name: prepare body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (C {(sed)} {(-i)} {(-e)} {(SQ <"s:-lslang:-lslang -lncurses:g">)} {(-e)} {(SQ <"s:instroot:DESTDIR:g">)} {(Makefile.in)} ) ] spids: [71] ) spids: [67 70] ) (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)} {(--without-tcl)} {(--disable-nls)} ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (C {(make)} {(Lit_VarLike "RPM_OPT_FLAGS=") (DQ ($ VSub_Name "$CFLAGS"))}) ] spids: [108] ) spids: [104 107] ) (FuncDef name: package body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (AndOr children: [ (C {(make)} {(-j1)} {(Lit_VarLike "DESTDIR=") (DQ ($ VSub_Name "$pkgdir"))} {(Lit_VarLike "prefix=") (DQ (/usr))} {(Lit_VarLike "RPM_OPT_FLAGS=") (DQ (ERROR))} {(install)} ) (C {(true)}) ] op_id: Op_DPipe ) ] spids: [169] ) spids: [165 168] ) (FuncDef name: py2 body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("A NEWT module for Python2"))} spids: [220] ) ] spids: [220] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/lib/)}) (C {(mv)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/lib/python2.7)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/lib/)} ) ] spids: [217] ) spids: [213 216] ) (FuncDef name: py3 body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("A NEWT module for Python3"))} spids: [259] ) ] spids: [259] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/lib/)}) (C {(mv)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/lib/python3.6)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/lib/)} ) ] spids: [256] ) spids: [252 255] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha512sums) op: Equal rhs: { (DQ ( "0c10c373c6a5299a85fc38f32d3590fff3b26c4be40e6c85ed73c20724ef2fb094bf37a8c3b1b80a4bcdfc14fe59254d4419c391245c298a4e16788954b88236 newt-0.52.20.tar.gz\n" ) ( "ea3937142ce776b6c227936e87f7bc28116ab7775db5785600e39bee38eba914d3ccae1ecb54d9f4ac9505918da255d69a777b105d80d72cd087545b1dae18bc parallel-build.patch\n" ) ( "ce53446eb587b79790f12f806f02999568cb49067520813ab146d1f16c71f009e86ab72d08666e483b550fdae3332b673935b8aa1a14b02f5273217fb5404611 fix-includes.patch" ) ) } spids: [290] ) ] spids: [290] ) ] )