From 61f36e8cb5d15ccc6121b9e7070371b998b77095 Mon Sep 17 00:00:00 2001 From: Cedric Girard Date: Wed, 12 Aug 2015 12:09:33 +0200 Subject: [PATCH 1/3] first package version --- .SRCINFO | 16 ++++++++++++++++ PKGBUILD | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 .SRCINFO create mode 100644 PKGBUILD diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..9fa7bbb --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = libcrossguid-git + pkgdesc = Lightweight cross platform C++ GUID/UUID library + pkgver = r35.8f399e8 + pkgrel = 1 + url = https://github.com/graeme-hill/crossguid + arch = i686 + arch = x86_64 + license = MIT + makedepends = git + provides = libcrossguid + conflicts = libcrossguid + source = libcrossguid::git+https://github.com/graeme-hill/crossguid.git + md5sums = SKIP + +pkgname = libcrossguid-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..af72eb4 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Cedric Girard + +pkgname=libcrossguid-git +pkgver=r35.8f399e8 +pkgrel=1 +pkgdesc="Lightweight cross platform C++ GUID/UUID library" +arch=('i686' 'x86_64') +url="https://github.com/graeme-hill/crossguid" +license=('MIT') +makedepends=('git') +provides=('libcrossguid') +conflicts=('libcrossguid') +source=('libcrossguid::git+https://github.com/graeme-hill/crossguid.git') +md5sums=('SKIP') + +pkgver() { + cd "$srcdir"/libcrossguid + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd "$srcdir"/libcrossguid + + g++ -c guid.cpp -o guid.o $CXXFLAGS -std=c++11 -DGUID_LIBUUID + ar rvs libcrossguid.a guid.o + + g++ -c test.cpp -o test.o $CXXFLAGS -std=c++11 + g++ -c testmain.cpp -o testmain.o $CXXFLAGS + g++ test.o guid.o testmain.o -o test $CXXFLAGS -luuid + chmod +x test + +} + +check(){ + cd "$srcdir"/libcrossguid + ./test +} + +package() { + cd "$srcdir"/libcrossguid + install -D -m644 libcrossguid.a "${pkgdir}/usr/lib/libcrossguid.a" + install -D -m644 guid.h "${pkgdir}/usr/include/guid.h" + install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} + +# vim:set ts=2 sw=2 et: From 88c8dabd3fcffcf6b50bf7b6968aea9cfd4fd836 Mon Sep 17 00:00:00 2001 From: Cedric Girard Date: Mon, 26 Jun 2017 11:32:34 +0200 Subject: [PATCH 2/3] 0.2 version use cmake and produces different files --- .SRCINFO | 3 ++- PKGBUILD | 22 ++++++++-------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 9fa7bbb..77c7f49 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,12 +1,13 @@ pkgbase = libcrossguid-git pkgdesc = Lightweight cross platform C++ GUID/UUID library - pkgver = r35.8f399e8 + pkgver = 0.2.1.r1.g71c709e pkgrel = 1 url = https://github.com/graeme-hill/crossguid arch = i686 arch = x86_64 license = MIT makedepends = git + makedepends = cmake provides = libcrossguid conflicts = libcrossguid source = libcrossguid::git+https://github.com/graeme-hill/crossguid.git diff --git a/PKGBUILD b/PKGBUILD index af72eb4..8df472f 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,13 +1,13 @@ # Maintainer: Cedric Girard pkgname=libcrossguid-git -pkgver=r35.8f399e8 +pkgver=0.2.1.r1.g71c709e pkgrel=1 pkgdesc="Lightweight cross platform C++ GUID/UUID library" arch=('i686' 'x86_64') url="https://github.com/graeme-hill/crossguid" license=('MIT') -makedepends=('git') +makedepends=('git' 'cmake') provides=('libcrossguid') conflicts=('libcrossguid') source=('libcrossguid::git+https://github.com/graeme-hill/crossguid.git') @@ -15,31 +15,25 @@ md5sums=('SKIP') pkgver() { cd "$srcdir"/libcrossguid - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } build() { cd "$srcdir"/libcrossguid - - g++ -c guid.cpp -o guid.o $CXXFLAGS -std=c++11 -DGUID_LIBUUID - ar rvs libcrossguid.a guid.o - - g++ -c test.cpp -o test.o $CXXFLAGS -std=c++11 - g++ -c testmain.cpp -o testmain.o $CXXFLAGS - g++ test.o guid.o testmain.o -o test $CXXFLAGS -luuid - chmod +x test + cmake . + make } check(){ cd "$srcdir"/libcrossguid - ./test + ./xgtest } package() { cd "$srcdir"/libcrossguid - install -D -m644 libcrossguid.a "${pkgdir}/usr/lib/libcrossguid.a" - install -D -m644 guid.h "${pkgdir}/usr/include/guid.h" + install -D -m644 libxg.a "${pkgdir}/usr/lib/libxg.a" + install -D -m644 Guid.hpp "${pkgdir}/usr/include/Guid.hpp" install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } From 35f281a412b123c9eadfe6075e3ad94c9c160704 Mon Sep 17 00:00:00 2001 From: Cedric Girard Date: Fri, 23 Mar 2018 15:09:16 +0100 Subject: [PATCH 3/3] adapt to some namming changes --- .SRCINFO | 2 +- PKGBUILD | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 77c7f49..cb074e8 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = libcrossguid-git pkgdesc = Lightweight cross platform C++ GUID/UUID library - pkgver = 0.2.1.r1.g71c709e + pkgver = 0.2.2.r15.g7a42917 pkgrel = 1 url = https://github.com/graeme-hill/crossguid arch = i686 diff --git a/PKGBUILD b/PKGBUILD index 8df472f..68c2e72 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Cedric Girard pkgname=libcrossguid-git -pkgver=0.2.1.r1.g71c709e +pkgver=0.2.2.r15.g7a42917 pkgrel=1 pkgdesc="Lightweight cross platform C++ GUID/UUID library" arch=('i686' 'x86_64') @@ -27,13 +27,13 @@ build() { check(){ cd "$srcdir"/libcrossguid - ./xgtest + ./crossguid-test } package() { cd "$srcdir"/libcrossguid - install -D -m644 libxg.a "${pkgdir}/usr/lib/libxg.a" - install -D -m644 Guid.hpp "${pkgdir}/usr/include/Guid.hpp" + install -D -m644 libcrossguid.a "${pkgdir}/usr/lib/libcrossguid.a" + install -D -m644 include/crossguid/guid.hpp "${pkgdir}/usr/include/guid.hpp" install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }