# Contributor: k0r10n # Contributor: Jose-Luis Rivas # Maintainer: Carlo Landmeter global pkgname := 'libzip' global pkgver := '1.3.0' global pkgrel := '0' global pkgdesc := '"A C library for reading, creating, and modifying zip archives'" global url := '"http://www.nih.at/libzip/index.html'" global arch := '"all'" global license := '"BSD'" global depends := '' global depends_dev := '"zlib-dev'" global makedepends := ""$depends_dev perl"" global subpackages := ""$pkgname-dev $pkgname-doc $pkgname-tools"" global source := ""http://www.nih.at/libzip/$pkgname-$pkgver.tar.gz"" global builddir := ""$srcdir/$pkgname-$pkgver"" # secfixes: # 1.3.0: # - CVE-2017-14107 proc build { cd $builddir ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var \ || return 1 make || return 1 } proc package { cd $builddir make DESTDIR="$pkgdir" -j1 install install-man || return 1 mv "$pkgdir"/usr/lib/libzip/include/* "$pkgdir"/usr/include || return 1 rm -fr "$pkgdir"/usr/lib/libzip } proc tools { global pkgdesc := ""$pkgname cmp and merge tools"" install -d "$subpkgdir"/usr mv "$pkgdir"/usr/bin "$subpkgdir"/usr || return 1 } global sha512sums := '"8cffbcd27b9e6c9676c5224c5784190bff881ac690ce0f58702b17c99ee6d1c14eda266298841f896a02233d2eb5f4147d5c8b4ad55d36c384eaa560fd96ff89 libzip-1.3.0.tar.gz'" (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgname) op:Equal rhs:{(libzip)} spids:[9])] spids: [9] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgver) op:Equal rhs:{(1.3.0)} spids:[12])] spids: [12] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgrel) op:Equal rhs:{(0)} spids:[15])] spids: [15] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("A C library for reading, creating, and modifying zip archives"))} spids: [18] ) ] spids: [18] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("http://www.nih.at/libzip/index.html"))} spids: [23] ) ] spids: [23] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ (all))} spids:[28])] spids: [28] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:license) op:Equal rhs:{(DQ (BSD))} spids:[33])] spids: [33] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:depends) op:Equal rhs:{(SQ )} spids:[38])] spids: [38] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:depends_dev) op:Equal rhs:{(DQ (zlib-dev))} spids:[40])] spids: [40] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:makedepends) op: Equal rhs: {(DQ ($ VSub_Name "$depends_dev") (" perl"))} spids: [45] ) ] spids: [45] ) (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") (-tools) ) } spids: [51] ) ] spids: [51] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:source) op: Equal rhs: { (DQ ("http://www.nih.at/libzip/") ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver") (.tar.gz) ) } spids: [61] ) ] spids: [61] ) (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: [71] ) ] spids: [71] ) (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)} {(--sysconfdir) (Lit_Other "=") (/etc)} {(--mandir) (Lit_Other "=") (/usr/share/man)} {(--localstatedir) (Lit_Other "=") (/var)} ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (AndOr children: [(C {(make)}) (ControlFlow token: arg_word:{(1)})] op_id: Op_DPipe ) ] spids: [95] ) spids: [91 94] ) (FuncDef name: package body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (AndOr children: [ (C {(make)} {(Lit_VarLike "DESTDIR=") (DQ ($ VSub_Name "$pkgdir"))} {(-j1)} {(install)} {(install-man)} ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(mv)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/lib/libzip/include/) (Lit_Other "*")} {(DQ ($ VSub_Name "$pkgdir")) (/usr/include)} ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (C {(rm)} {(-fr)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/lib/libzip)}) ] spids: [167] ) spids: [163 166] ) (FuncDef name: tools body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ($ VSub_Name "$pkgname") (" cmp and merge tools"))} spids: [236] ) ] spids: [236] ) (C {(install)} {(-d)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr)}) (AndOr children: [ (C {(mv)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/bin)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr)} ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) ] spids: [233] ) spids: [229 232] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha512sums) op: Equal rhs: { (DQ ( "8cffbcd27b9e6c9676c5224c5784190bff881ac690ce0f58702b17c99ee6d1c14eda266298841f896a02233d2eb5f4147d5c8b4ad55d36c384eaa560fd96ff89 libzip-1.3.0.tar.gz" ) ) } spids: [274] ) ] spids: [274] ) ] )