# Contributor: Sergei Lukin # Contributor: Łukasz Jendrysik # Contributor: Sören Tempel # Maintainer: Natanael Copa global pkgname := 'vim' global pkgver := '8.0.1171' global pkgrel := '0' global pkgdesc := '"advanced text editor'" global url := '"http://www.vim.org'" global arch := '"all'" global license := '"custom'" global depends := ''"" global makedepends := '"ncurses-dev lua5.2-dev python3-dev'" global subpackages := ""$pkgname-doc $(pkgname)diff::noarch"" global source := ""$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz vimrc "" global builddir := ""$srcdir/$pkgname-$pkgver"" # secfixes: # 8.0.0329-r0: # - CVE-2017-5953 # 8.0.0056-r0: # - CVE-2016-1248 proc prepare { cd $builddir # Read vimrc from /etc/vim echo '#define SYS_VIMRC_FILE "/etc/vim/vimrc"' >> src/feature.h } proc build { cd $builddir ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --enable-luainterp \ --enable-python3interp=dynamic \ --without-x \ --disable-nls \ --enable-multibyte \ --enable-gui=no \ --with-lua-prefix=/usr/lua5.2 \ --with-compiledby="Alpine Linux" \ || return 1 make || return 1 } proc package { cd $builddir make -j1 DESTDIR="$pkgdir/" install install -Dm644 runtime/doc/uganda.txt \ "$pkgdir/usr/share/licenses/$pkgname/LICENSE" || return 1 install -Dm644 "$srcdir"/vimrc "$pkgdir"/etc/vim/vimrc || return 1 } proc vimdiff { global pkgdesc := '"view file diffs in vim'" global depends := '"diffutils'" install -d "$subpkgdir"/usr/bin || return 1 mv "$pkgdir"/usr/bin/vimdiff "$subpkgdir"/usr/bin } global sha512sums := '"b192b8da3aad1f4203495e11d0fd89d41aa2b2bb4c3667c6885afd6e2b95f4d44a047b7481bb83837e28a61da2a97eb3cd6add13f29e8e7db96bda628a3da185 vim-8.0.1171.tar.gz d9586b777881973cb5e48e18750336a522ed72c3127b2d6b6991e2b943468ca5b694476e7fa39ab469178c1375fc8f52627484e0fe377aea5811a513e35a7b02 vimrc'" (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgname) op:Equal rhs:{(vim)} spids:[12])] spids: [12] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgver) op:Equal rhs:{(8.0.1171)} spids:[15])] spids: [15] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgrel) op:Equal rhs:{(0)} spids:[18])] spids: [18] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("advanced text editor"))} spids: [21] ) ] spids: [21] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("http://www.vim.org"))} spids: [26] ) ] spids: [26] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ (all))} spids:[31])] spids: [31] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:license) op:Equal rhs:{(DQ (custom))} spids:[36])] spids: [36] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:depends) op:Equal rhs:{(DQ )} spids:[41])] spids: [41] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:makedepends) op: Equal rhs: {(DQ ("ncurses-dev lua5.2-dev python3-dev"))} spids: [45] ) ] spids: [45] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subpackages) op: Equal rhs: {(DQ ($ VSub_Name "$pkgname") ("-doc ") (${ VSub_Name pkgname) ("diff::noarch"))} spids: [50] ) ] spids: [50] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:source) op: Equal rhs: { (DQ ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver") (".tar.gz::https://github.com/") ($ VSub_Name "$pkgname") (/) ($ VSub_Name "$pkgname") (/archive/v) ($ VSub_Name "$pkgver") (".tar.gz\n") ("\tvimrc\n") ("\t") ) } spids: [60] ) ] spids: [60] ) (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: [76] ) ] spids: [76] ) (FuncDef name: prepare body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (SimpleCommand words: [{(echo)} {(SQ <"#define SYS_VIMRC_FILE \"/etc/vim/vimrc\"">)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(src/feature.h)} spids:[126])] ) ] spids: [106] ) spids: [102 105] ) (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)} {(--enable-luainterp)} {(--enable-python3interp) (Lit_Other "=") (dynamic)} {(--without-x)} {(--disable-nls)} {(--enable-multibyte)} {(--enable-gui) (Lit_Other "=") (no)} {(--with-lua-prefix) (Lit_Other "=") (/usr/lua5.2)} {(--with-compiledby) (Lit_Other "=") (DQ ("Alpine Linux"))} ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (AndOr children: [(C {(make)}) (ControlFlow token: arg_word:{(1)})] op_id: Op_DPipe ) ] spids: [137] ) spids: [133 136] ) (FuncDef name: package body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (C {(make)} {(-j1)} {(Lit_VarLike "DESTDIR=") (DQ ($ VSub_Name "$pkgdir") (/))} {(install)}) (AndOr children: [ (C {(install)} {(-Dm644)} {(runtime/doc/uganda.txt)} { (DQ ($ VSub_Name "$pkgdir") (/usr/share/licenses/) ($ VSub_Name "$pkgname") (/LICENSE) ) } ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(install)} {(-Dm644)} {(DQ ($ VSub_Name "$srcdir")) (/vimrc)} {(DQ ($ VSub_Name "$pkgdir")) (/etc/vim/vimrc)} ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) ] spids: [233] ) spids: [229 232] ) (FuncDef name: vimdiff body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("view file diffs in vim"))} spids: [309] ) ] spids: [309] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:depends) op: Equal rhs: {(DQ (diffutils))} spids: [315] ) ] spids: [315] ) (AndOr children: [ (C {(install)} {(-d)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin)}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (C {(mv)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/bin/vimdiff)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin)} ) ] spids: [306] ) spids: [302 305] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha512sums) op: Equal rhs: { (DQ ( "b192b8da3aad1f4203495e11d0fd89d41aa2b2bb4c3667c6885afd6e2b95f4d44a047b7481bb83837e28a61da2a97eb3cd6add13f29e8e7db96bda628a3da185 vim-8.0.1171.tar.gz\n" ) ( "d9586b777881973cb5e48e18750336a522ed72c3127b2d6b6991e2b943468ca5b694476e7fa39ab469178c1375fc8f52627484e0fe377aea5811a513e35a7b02 vimrc" ) ) } spids: [353] ) ] spids: [353] ) ] )