diff options
author | Christoph Haag | 2018-03-04 15:11:05 +0100 |
---|---|---|
committer | Christoph Haag | 2018-03-04 15:11:05 +0100 |
commit | 8b694f8e9ed5a1debd7db47b27f18e45941d43f4 (patch) | |
tree | bdebbe26896e544e8be4f4e660197b08a7d60b7e | |
download | aur-8b694f8e9ed5a1debd7db47b27f18e45941d43f4.tar.gz |
initial
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | CMakeLists.txt | 27 | ||||
-rw-r--r-- | PKGBUILD | 39 |
3 files changed, 83 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..843fb1f347df --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +# Generated by mksrcinfo v8 +# Sun Mar 4 14:10:57 UTC 2018 +pkgbase = serial-git + pkgdesc = cross-platform library for interfacing with rs-232 serial like ports written in C++ + pkgver = r368.5a354ea + pkgrel = 1 + url = https://github.com/wjwwood/serial + arch = x86_64 + license = MIT + makedepends = git + source = git+https://github.com/wjwwood/serial.git + source = CMakeLists.txt + sha512sums = SKIP + sha512sums = 456e32c00e52bbbcc470f4f822fa488a88314e690f6419527107738e6fa18b226f74d7ba9907d0a569c60892619140b7269425ac8fa3e4339bef3bffea3e8ad6 + +pkgname = serial-git + diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 000000000000..d7d70cb1f417 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,27 @@ +# taken from https://github.com/wjwwood/serial/issues/52#issuecomment-28848337 +cmake_minimum_required(VERSION 2.8.3) +project(my_project) + +include_directories(include) + +set(serial_SRCS src/serial.cc include/serial/serial.h include/serial/v8stdint.h) +if(UNIX) + list(APPEND serial_SRCS src/impl/unix.cc) +else() + list(APPEND serial_SRCS src/impl/win.cc) +endif() + +## Add serial library +add_library(serial SHARED ${serial_SRCS}) +if(UNIX AND NOT APPLE) + target_link_libraries(serial rt) +endif() + +## Build your executable +#add_executable(my_program src/my_program.cpp) +## Link your executable against the library +#target_link_libraries(my_program serial) + +install(TARGETS serial DESTINATION lib) +install(FILES include/serial/serial.h DESTINATION include/serial) +install(FILES include/serial/v8stdint.h DESTINATION include/serial) diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..3105b40830e2 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Christoph Haag <haagch+serial@frickel.club> + +pkgname="serial-git" +pkgver=r368.5a354ea +pkgrel=1 +pkgdesc="cross-platform library for interfacing with rs-232 serial like ports written in C++" +arch=('x86_64') +url="https://github.com/wjwwood/serial" +license=('MIT') +makedepends=('git') +conflicts=() +provides=() +source=("git+https://github.com/wjwwood/serial.git" + "CMakeLists.txt") +sha512sums=('SKIP' + '456e32c00e52bbbcc470f4f822fa488a88314e690f6419527107738e6fa18b226f74d7ba9907d0a569c60892619140b7269425ac8fa3e4339bef3bffea3e8ad6') + +pkgver() { + cd serial + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cp "$srcdir/CMakeLists.txt" serial +} + +build() { + mkdir -p serial-build + cd serial-build + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/ ../serial + + make +} + +package() { + cd serial-build + + make DESTDIR="${pkgdir}" PREFIX=/usr install +} |