Edvinas Valatka 10 年之前
父節點
當前提交
f9a78a6106
共有 3 個文件被更改,包括 26 次插入64 次删除
  1. 10 9
      .SRCINFO
  2. 16 55
      PKGBUILD
  3. 0 0
      autoconfiguration-for-libjansson.patch

+ 10 - 9
.SRCINFO

@@ -1,6 +1,6 @@
 pkgbase = ccnet
 	pkgdesc = A framework for writing networked applications in C.
-	pkgver = 1.4.2
+	pkgver = 4.3.4
 	pkgrel = 16
 	url = https://github.com/haiwen/ccnet/
 	arch = i686
@@ -8,18 +8,19 @@ pkgbase = ccnet
 	arch = armv7h
 	arch = armv6h
 	license = custom
-	makedepends = vala>=0.8
+	makedepends = vala
 	makedepends = pacman>=4.1
-	depends = libevent>=2.0
-	depends = libzdb>=2.10.2
-	depends = libsearpc>=1.2.2
-	depends = jansson>=2.2.1
+	depends = libevent
+	depends = libzdb
+	depends = libsearpc>=3.0.7
+	depends = jansson
 	depends = libldap
-	depends = python2>=2.6
-	source = https://github.com/haiwen/ccnet/archive/v4.3.4.tar.gz
+	depends = python2
+	options = !makeflags
+	source = ccnet-v4.3.4.tar.gz::https://github.com/haiwen/ccnet/archive/v4.3.4.tar.gz
 	source = https://raw.githubusercontent.com/haiwen/ccnet/master/COPYRIGHT
 	source = libccnet.pc.patch
-	source = 0001-Add-autoconfiguration-for-libjansson.patch
+	source = autoconfiguration-for-libjansson.patch
 	sha256sums = 138d6de92388440ce378fc923c50674b80f823e3d2396254dc6c60da5daf2a09
 	sha256sums = c07aeccf581c255e60acbddcc6af90290e0d6354e6ec0ee1987b82845d3d57ac
 	sha256sums = 66c3b02c3981db6a80819e0ae103bedadf8dfdf81405a7f75a9cba714acf973f

+ 16 - 55
PKGBUILD

@@ -1,79 +1,40 @@
-# Maintainer: Moritz Maxeiner <moritz@ucworks.org>
 # Contributor: Aaron Lindsay <aaron@aclindsay.com>
+# Maintainer: Edvinas Valatka <edacval@gmail.com>
 
-# Name of the Software your PKGBUILD will install - should be unique. See PKGBUILD#pkgname
 pkgname=ccnet
-
-# The version number for the software
-pkgver=1.4.2
-_seafilever=4.3.4
-
-#The release number for the arch package, as fixes are added to the PKGBUILD, the release number will increase
+pkgver=4.3.4
 pkgrel=16
-
-# The description of the package, should be about 80 characters long (one line)
 pkgdesc="A framework for writing networked applications in C."
-
-# The type of processor this software can build and work on. See PKGBUILD#arch
 arch=('i686' 'x86_64' 'armv7h' 'armv6h')
-
-# The official website for the software your PKGBUILD will install
 url="https://github.com/haiwen/ccnet/"
-
-# The License that the software is released under. See PKGBUILD#license
 license=('custom')
+depends=('libevent' 'libzdb' 'libsearpc>=3.0.7' 'jansson' 'libldap' 'python2')
+makedepends=('vala' 'pacman>=4.1')
+options=('!makeflags')
 
-# Packages that your software needs to run. If the dependancy requires a minimum version number use the >= operator
-depends=('libevent>=2.0' 'libzdb>=2.10.2' 'libsearpc>=1.2.2' 'jansson>=2.2.1' 'libldap' 'python2>=2.6')
-
-# Packages that must be installed to build the software, but at not necessary to run it
-makedepends=('vala>=0.8' 'pacman>=4.1')
-
-# Optional packages that extend the software's functionality
-optdepends=()
-
-# List of Package names that this PKGBUILD provides. Put modified packages that will be installed here.
-provides=()
-
-# Change the default behavior of makepkg see PKGBUILD#options
-options=()
-
-source=("https://github.com/haiwen/ccnet/archive/v${_seafilever}.tar.gz"
+source=("${pkgname}-v${pkgver}.tar.gz::https://github.com/haiwen/${pkgname}/archive/v${pkgver}.tar.gz"
 	"https://raw.githubusercontent.com/haiwen/ccnet/master/COPYRIGHT"
 	"libccnet.pc.patch"
-	"0001-Add-autoconfiguration-for-libjansson.patch")
-
-configure_ccnet() {
-	./autogen.sh
-	CFLAGS="$CFLAGS -lpthread" ./configure --enable-server --enable-ldap --prefix=/usr PYTHON=/usr/bin/python2
-}
-
-pkgver() {
-	cd "$srcdir/$pkgname-$_seafilever"
-	configure_ccnet &> /dev/null
-	grep "PACKAGE_VERSION" Makefile | sed 's/PACKAGE_VERSION.*=[ \t]\+\([0-9\.]\+\)[ \t]*/\1/g'
-}
+	"autoconfiguration-for-libjansson.patch")
 
 prepare () {
-	cd "$srcdir/$pkgname-$_seafilever"
+	cd "$srcdir/$pkgname-$pkgver"
 	patch -p1 -i $srcdir/libccnet.pc.patch
-	patch -p1 -i $srcdir/0001-Add-autoconfiguration-for-libjansson.patch
+	patch -p1 -i $srcdir/autoconfiguration-for-libjansson.patch
 }
 
 build () {
-	cd "$srcdir/$pkgname-$_seafilever"
-	configure_ccnet
+	cd "$srcdir/$pkgname-$pkgver"
+	./autogen.sh
+	CFLAGS="$CFLAGS -lpthread" ./configure --enable-server --enable-ldap --prefix=/usr PYTHON=/usr/bin/python2
 	make -j1
 }
 
 package () {
-	#install library and header files
-	cd "$srcdir/$pkgname-$_seafilever"
-	make DESTDIR="$pkgdir/" install
-
-	#copy license over
-	mkdir -p $pkgdir/usr/share/licenses/$pkgname
-	cp $srcdir/COPYRIGHT $pkgdir/usr/share/licenses/$pkgname/
+	cd "$srcdir/$pkgname-$pkgver"
+	make DESTDIR="$pkgdir" install
+    mkdir -p $pkgdir/usr/share/licenses/$pkgname
+    cp COPYRIGHT $pkgdir/usr/share/licenses/$pkgname/
 }
 sha256sums=('138d6de92388440ce378fc923c50674b80f823e3d2396254dc6c60da5daf2a09'
             'c07aeccf581c255e60acbddcc6af90290e0d6354e6ec0ee1987b82845d3d57ac'

0001-Add-autoconfiguration-for-libjansson.patch → autoconfiguration-for-libjansson.patch