diff options
author | Tmplt | 2018-05-12 00:19:22 +0200 |
---|---|---|
committer | Tmplt | 2018-05-12 00:19:22 +0200 |
commit | 8f470273bfd44faacf7228460e2ef56116e13522 (patch) | |
tree | 89d57f9aa678ea668f66c8e24530658ecdcb3d2a | |
download | aur-8f470273bfd44faacf7228460e2ef56116e13522.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 42 |
2 files changed, 60 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..38db7ae0d06b --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = bookwyrm-git + pkgdesc = traverse various sources, find ebooks/textbooks/papers, and download them + pkgver = v0.5.0.r0.g92cd41b + pkgrel = 1 + url = https://github.com/Tmplt/bookwyrm + arch = x86_64 + license = MIT + makedepends = cmake + makedepends = git + depends = curl + depends = python + provides = bookwyrm + conflicts = bookwyrm + source = bookwyrm::git+https://github.com/Tmplt/bookwyrm.git + md5sums = SKIP + +pkgname = bookwyrm-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b75476608483 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer: Tmplt <tmplt@dragons.rocks> +_pkgname=bookwyrm +pkgname="${_pkgname}-git" +pkgver=v0.5.0.r0.g92cd41b +pkgrel=1 +pkgdesc="traverse various sources, find ebooks/textbooks/papers, and download them " +arch=("x86_64") +url="https://github.com/Tmplt/bookwyrm" +license=("MIT") +depends=("curl" "python") +makedepends=("cmake" "git") +provides=("bookwyrm") +conflicts=("bookwyrm") +source=("${_pkgname}::git+${url}.git") +md5sums=("SKIP") + +pkgver() { + git -C "${_pkgname}" describe --long --tags | sed "s/-/.r/;s/-/./g" +} + +prepare() { + git -C "${_pkgname}" submodule update --init --recursive + mkdir -p "${_pkgname}/build" + + # Comment out `find_package(Curses REQUIRED)` for now + sed -i 's/find_package(Curses REQUIRED)/#find_package(Curses REQUIRED)/' "${_pkgname}/src/tui/CMakeLists.txt" + sed -i 's/${CURSES_LIBRARIES}/ncursesw/' "${_pkgname}/src/tui/CMakeLists.txt" + + # ad-hoc fix some install paths + sed -i 's/usr\/bin/bin/' "${_pkgname}/src/CMakeLists.txt" + sed -i 's/usr\/lib/lib/' "${_pkgname}/src/core/bindings/CMakeLists.txt" +} + +build() { + cd "${_pkgname}/build" || exit 1 + cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo .. + cmake --build . +} + +package() { + cmake --build "${_pkgname}/build" --target install -- DESTDIR="${pkgdir}" +} |