summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorxentec <xentec@aix0.eu>2015-12-02 20:02:55 +0100
committerxentec <xentec@aix0.eu>2015-12-02 20:12:55 +0100
commitc83f74d84e1697129ba0801d795a0ea970fad421 (patch)
treeedee989a81e0c33c5c96fe765a9dd8c0640424bc
parent0420800d37dbdd01f8c75ac51ea5df0f154a1830 (diff)
^ 2.0.0
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD38
-rw-r--r--cppformat.install10
3 files changed, 46 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 060ec0e..d3856f7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,21 @@
pkgbase = cppformat
pkgdesc = Small, safe and fast formatting library for C++
- pkgver = 1.1.0
+ pkgver = 2.0.0
pkgrel = 1
url = http://cppformat.github.io
+ install = cppformat.install
arch = i686
arch = x86_64
license = BSD
+ checkdepends = gmock
makedepends = cmake
+ makedepends = doxygen
+ makedepends = nodejs-less
+ makedepends = python-virtualenv
depends = gcc-libs
conflicts = cppformat-git
- source = https://github.com/cppformat/cppformat/archive/1.1.0.tar.gz
- sha256sums = d859f7e520629351294e194f0d1fb889b1edda9a44c139b126562107c1783142
+ source = https://github.com/cppformat/cppformat/archive/2.0.0.tar.gz
+ sha256sums = 2f333779a0709cc28490a4ac0690ba9f64db52c2883a971997aab1c2fbd6f6af
pkgname = cppformat
diff --git a/PKGBUILD b/PKGBUILD
index 203e5cd..73ae21a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Xentec <xentec at aix0 dot eu>
pkgname=cppformat
-pkgver=1.1.0
+pkgver=2.0.0
pkgrel=1
pkgdesc="Small, safe and fast formatting library for C++"
arch=('i686' 'x86_64')
@@ -9,11 +9,21 @@ url="http://cppformat.github.io"
license=('BSD')
depends=('gcc-libs')
-makedepends=('cmake')
+makedepends=('cmake' 'doxygen' 'nodejs-less' 'python-virtualenv')
+checkdepends=('gmock')
conflicts=('cppformat-git')
+install=$pkgname.install
+
source=("https://github.com/cppformat/$pkgname/archive/$pkgver.tar.gz")
-sha256sums=('d859f7e520629351294e194f0d1fb889b1edda9a44c139b126562107c1783142')
+sha256sums=('2f333779a0709cc28490a4ac0690ba9f64db52c2883a971997aab1c2fbd6f6af')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+
+ # removes the need for nodejs-clean-css package
+ sed -i "s/'--clean-css',//" doc/build.py
+}
build() {
cd "$pkgname-$pkgver"
@@ -23,26 +33,34 @@ build() {
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=1 \
+ -DFMT_TEST=0 \
-Wno-dev \
..
make
+ make doc
}
check() {
- cd "$pkgname-$pkgver"
- cd build
+ cd "$pkgname-$pkgver/build"
+ cmake \
+ -DFMT_TEST=1 \
+ -Wno-dev \
+ ..
+
+ make
make test
}
package() {
- cd "$pkgname-$pkgver"
+ cd "$pkgname-$pkgver/build"
- sed -n '/License/{:a;n;/Documentation License/b;p;ba}' README.rst | tail -n +1 >> LICENSE
+ make DESTDIR="$pkgdir" install
+ install -D -m644 ../LICENSE.rst ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ install -D -m644 ../ChangeLog.rst ${pkgdir}/usr/share/doc/${pkgname}/ChangeLog.rst
- install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- install -D -m644 format.h "${pkgdir}/usr/include/format.h"
- install -D -m755 build/libformat.so "$pkgdir/usr/lib/libformat.so"
+ # clean up
+ rm -rf ${pkgdir}/usr/share/doc/${pkgname}/{.buildinfo,.doctrees,_sources}
}
diff --git a/cppformat.install b/cppformat.install
new file mode 100644
index 0000000..cc3fa69
--- /dev/null
+++ b/cppformat.install
@@ -0,0 +1,10 @@
+
+post_upgrade()
+{
+ if [[ $(vercmp 2.0.0 "$2") -eq 1 ]]; then
+ echo "BREAKING: libformat.so became libcppformat.so"
+ echo " format.h was moved to cppformat/format.h"
+ echo " More breaking changes are documented in"
+ echo " /usr/share/doc/cppformat/ChangeLog.rst"
+ fi
+} \ No newline at end of file