mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
45 lines
1.1 KiB
Bash
45 lines
1.1 KiB
Bash
# Contribution from AUR:
|
|
# Maintainer: Cedric Girard <girard.cedric@gmail.com>
|
|
|
|
pkgname=crossguid-git
|
|
_pkgname=crossguid
|
|
pkgver=r35.8f399e8
|
|
pkgrel=1
|
|
pkgdesc="Lightweight cross platform C++ GUID/UUID library"
|
|
arch=('x86_64')
|
|
url="https://github.com/graeme-hill/crossguid"
|
|
license=('MIT')
|
|
makedepends=('git')
|
|
source=('crossguid::git+https://github.com/graeme-hill/crossguid.git')
|
|
md5sums=('SKIP')
|
|
|
|
pkgver() {
|
|
cd "$srcdir"/$_pkgname
|
|
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
|
}
|
|
|
|
build() {
|
|
cd "$srcdir"/$_pkgname
|
|
|
|
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"/$_pkgname
|
|
./test
|
|
}
|
|
|
|
package() {
|
|
cd "$srcdir"/$_pkgname
|
|
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"
|
|
}
|