# Contributor: Łukasz Jendrysik # Contributor: Carlo Landmeter # Contributor: Sören Tempel # Maintainer: Natanael Copa global pkgname := 'syncthing' global pkgver := '0.14.35' global pkgrel := '0' global pkgdesc := '"Open Source Continuous File Synchronization'" global url := '"http://syncthing.net/'" global arch := '"all !s390x !armhf !ppc64le'" global license := '"MPLv2'" global pkgusers := $pkgname global pkggroups := $pkgname global makedepends := '"go'" global install := ""$pkgname.pre-install"" global subpackages := ""$pkgname-utils"" global source := ""$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz $pkgname.initd only-test-with-race-when-provided.patch enable-generic-build-on-s390x.patch "" global builddir := ""$srcdir/src/github.com/$pkgname/$pkgname"" proc prepare { mkdir -p $(builddir%/*) mv "$srcdir"/$pkgname-$pkgver "$builddir"/ cd $builddir default_prepare } proc build { cd $builddir export GOPATH="$srcdir" go run build.go -no-upgrade -version=v$pkgver } proc check { cd $builddir export GOPATH="$srcdir" go run build.go -no-upgrade test } proc package { install -d -o $pkgname -g $pkgname "$pkgdir"/var/lib/$pkgname install -D -m755 $builddir/bin/$pkgname "$pkgdir"/usr/bin/$pkgname install -D -m755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname } proc utils { global pkgdesc := '"Syncthing utilities'" for i in [$[ls $builddir/bin]] { if ! test $i = $pkgname { install -Dm 755 $builddir/bin/$i $subpkgdir/usr/bin/$i } } } global sha512sums := '"2a3de76e7118be6e91b8bc6bc69b10e250755836b378fa762e0feaed280bb2206d2e4552f09fd230d51e246633108fd8cff343ac355742ebb1bd06c2145fe086 syncthing-0.14.35.tar.gz 7fe49210180827c28f3ee9a1a95da3884dbef34de9bdc643f4455c9a056adba81f16c1c6ac059e83bee360aea091ace98b8a6f4c4b26a32c450f61f15206d3f5 syncthing.initd 3fd2b699e07891ae16c67af56d516ba0fde13d5e5d067dd680fc59f9fc5b2f7c5f685b040841588cca6de1f7fb4b094572e5eb73dda8ab30d4b2994d3f526047 only-test-with-race-when-provided.patch 5dec62fc0555e298a1be4aede02dde3b407e8d4adbddc5d82d6dcd2f761f3b3eed7b71de51ab08efd185b84c9706fdb9e26a1086474623eb52b344cc793cf876 enable-generic-build-on-s390x.patch'" (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgname) op:Equal rhs:{(syncthing)} spids:[12])] spids: [12] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgver) op:Equal rhs:{(0.14.35)} 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 ("Open Source Continuous File Synchronization"))} spids: [21] ) ] spids: [21] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("http://syncthing.net/"))} spids: [26] ) ] spids: [26] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:arch) op: Equal rhs: {(DQ ("all !s390x !armhf !ppc64le"))} spids: [31] ) ] spids: [31] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:license) op:Equal rhs:{(DQ (MPLv2))} spids:[36])] spids: [36] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgusers) op: Equal rhs: {(DQ ($ VSub_Name "$pkgname"))} spids: [41] ) ] spids: [41] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkggroups) op: Equal rhs: {(DQ ($ VSub_Name "$pkgname"))} spids: [46] ) ] spids: [46] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:makedepends) op:Equal rhs:{(DQ (go))} spids:[51])] spids: [51] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:install) op: Equal rhs: {(DQ ($ VSub_Name "$pkgname") (.pre-install))} spids: [56] ) ] spids: [56] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subpackages) op: Equal rhs: {(DQ ($ VSub_Name "$pkgname") (-utils))} spids: [62] ) ] spids: [62] ) (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") ("\t") ($ VSub_Name "$pkgname") (".initd\n") ("\tonly-test-with-race-when-provided.patch\n") ("\tenable-generic-build-on-s390x.patch\n") ("\t") ) } spids: [69] ) ] spids: [69] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:builddir) op: Equal rhs: { (DQ ($ VSub_Name "$srcdir") (/src/github.com/) ($ VSub_Name "$pkgname") (/) ($ VSub_Name "$pkgname") ) } spids: [90] ) ] spids: [90] ) (FuncDef name: prepare body: (BraceGroup children: [ (C {(mkdir)} {(-p)} { (BracedVarSub token: suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /) ("*")}) spids: [111 116] ) } ) (C {(mv)} {(DQ ($ VSub_Name "$srcdir")) (/) ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver")} {(DQ ($ VSub_Name "$builddir")) (/)} ) (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (C {(default_prepare)}) ] spids: [104] ) spids: [100 103] ) (FuncDef name: build body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (C {(export)} {(Lit_VarLike "GOPATH=") (DQ ($ VSub_Name "$srcdir"))}) (C {(go)} {(run)} {(build.go)} {(-no-upgrade)} {(-version) (Lit_Other "=") (v) ($ VSub_Name "$pkgver")} ) ] spids: [151] ) spids: [147 150] ) (FuncDef name: check body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (C {(export)} {(Lit_VarLike "GOPATH=") (DQ ($ VSub_Name "$srcdir"))}) (C {(go)} {(run)} {(build.go)} {(-no-upgrade)} {(test)}) ] spids: [189] ) spids: [185 188] ) (FuncDef name: package body: (BraceGroup children: [ (C {(install)} {(-d)} {(-o)} {($ VSub_Name "$pkgname")} {(-g)} {($ VSub_Name "$pkgname")} {(DQ ($ VSub_Name "$pkgdir")) (/var/lib/) ($ VSub_Name "$pkgname")} ) (C {(install)} {(-D)} {(-m755)} {($ VSub_Name "$builddir") (/bin/) ($ VSub_Name "$pkgname")} {(DQ ($ VSub_Name "$pkgdir")) (/usr/bin/) ($ VSub_Name "$pkgname")} ) (C {(install)} {(-D)} {(-m755)} {(DQ ($ VSub_Name "$srcdir")) (/) ($ VSub_Name "$pkgname") (.initd)} {(DQ ($ VSub_Name "$pkgdir")) (/etc/init.d/) ($ VSub_Name "$pkgname")} ) ] spids: [224] ) spids: [220 223] ) (FuncDef name: utils body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Syncthing utilities"))} spids: [292] ) ] spids: [292] ) (ForEach iter_name: i iter_words: [ { (CommandSubPart command_list: (CommandList children: [(C {(ls)} {($ VSub_Name "$builddir") (/bin)})] ) left_token: spids: [304 309] ) } ] do_arg_iter: False body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$i"))} {(Lit_Other "=")} {(DQ ($ VSub_Name "$pkgname"))} {(Lit_Other "]")} ) ] negated: True ) terminator: ) ] action: [ (C {(install)} {(-Dm)} {(755)} {($ VSub_Name "$builddir") (/bin/) ($ VSub_Name "$i")} {($ VSub_Name "$subpkgdir") (/usr/bin/) ($ VSub_Name "$i")} ) ] spids: [-1 334] ) ] spids: [-1 352] ) ] spids: [312 355] ) spids: [303 310] ) ] spids: [289] ) spids: [285 288] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha512sums) op: Equal rhs: { (DQ ( "2a3de76e7118be6e91b8bc6bc69b10e250755836b378fa762e0feaed280bb2206d2e4552f09fd230d51e246633108fd8cff343ac355742ebb1bd06c2145fe086 syncthing-0.14.35.tar.gz\n" ) ( "7fe49210180827c28f3ee9a1a95da3884dbef34de9bdc643f4455c9a056adba81f16c1c6ac059e83bee360aea091ace98b8a6f4c4b26a32c450f61f15206d3f5 syncthing.initd\n" ) ( "3fd2b699e07891ae16c67af56d516ba0fde13d5e5d067dd680fc59f9fc5b2f7c5f685b040841588cca6de1f7fb4b094572e5eb73dda8ab30d4b2994d3f526047 only-test-with-race-when-provided.patch\n" ) ( "5dec62fc0555e298a1be4aede02dde3b407e8d4adbddc5d82d6dcd2f761f3b3eed7b71de51ab08efd185b84c9706fdb9e26a1086474623eb52b344cc793cf876 enable-generic-build-on-s390x.patch" ) ) } spids: [360] ) ] spids: [360] ) ] )