summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Meunier2018-11-22 23:30:26 +0100
committerGuillaume Meunier2018-11-23 21:45:02 +0100
commitbde77e13790ba63db9c9650bc856ea9ec7758392 (patch)
treed61c04a7a230e6bcc93410a96dab51ba0e63f333
downloadaur-bde77e13790ba63db9c9650bc856ea9ec7758392.tar.gz
First commit
-rw-r--r--.SRCINFO39
-rw-r--r--.gitignore7
-rw-r--r--PKGBUILD87
-rw-r--r--install-dir.patch40
4 files changed, 173 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..cc8c3c51b66
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,39 @@
+pkgbase = bsf-git
+ pkgdesc = A C++ library that aims to provide a unified foundation for the development of real-time graphical applications, whether games, engines or tools
+ pkgver = r4575.54f5a3abc
+ pkgrel = 1
+ url = https://www.bsframework.io/
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = cmake
+ makedepends = doxygen
+ makedepends = ninja
+ depends = libutil-linux
+ depends = libx11
+ depends = icu
+ depends = libxcursor
+ depends = libxrandr
+ depends = libxi
+ depends = libgl
+ depends = openal
+ depends = flac
+ depends = libvorbis
+ depends = snappy
+ depends = freeimage
+ depends = freetype2
+ provides = bsf
+ conflicts = bsf
+ source = git+https://github.com/Meumeu/bsf.git#branch=build-system-cleanup
+ source = install-dir.patch
+ source = https://data.banshee3d.com/bsfCompiledData_Master_5.zip
+ source = https://data.banshee3d.com/bsfData_Master_6.zip
+ source = https://data.banshee3d.com/bsfDependencies_Linux_Master_8.zip
+ sha256sums = SKIP
+ sha256sums = 3ebcebdbe4d5bad832a47109b09f6d9bcd3e02b7a0bb9be2301c8bd630ed706b
+ sha256sums = 49b419403f4f85e189832f3b89c78c037e7b531541bb67b130764f33c7306224
+ sha256sums = 3b5e087e200e786ab1a0b79d6f3cd04d4c70fde9337dc8082a13479f477d1025
+ sha256sums = 60c53790eda57495fefdad2bcc4a6a78198a330e70aeec71abc213edcc8b7036
+
+pkgname = bsf-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..7e356c4cae7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+*~
+bsf/
+src/
+pkg/
+
+*.zip
+*.pkg.tar*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..4d2ea5fdf2f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,87 @@
+# Maintainer: Guillaume Meunier <guillaume.meunier@centraliens.net>
+pkgname=bsf-git
+_pkgname=bsf
+pkgver=r4575.54f5a3abc
+pkgrel=1
+epoch=
+pkgdesc="A C++ library that aims to provide a unified foundation for the development of real-time graphical applications, whether games, engines or tools"
+arch=(x86_64)
+url="https://www.bsframework.io/"
+license=('MIT')
+groups=()
+depends=(libutil-linux libx11 icu libxcursor libxrandr libxi libgl openal flac libvorbis snappy freeimage freetype2)
+makedepends=(git cmake doxygen ninja)
+checkdepends=()
+optdepends=()
+provides=(bsf)
+conflicts=(bsf)
+replaces=()
+backup=()
+options=()
+install=
+changelog=
+
+# source=("git+https://github.com/GameFoundry/bsf.git"
+source=("git+https://github.com/Meumeu/bsf.git#branch=build-system-cleanup"
+ "install-dir.patch"
+ "https://data.banshee3d.com/bsfCompiledData_Master_5.zip"
+ "https://data.banshee3d.com/bsfData_Master_6.zip"
+ "https://data.banshee3d.com/bsfDependencies_Linux_Master_8.zip")
+noextract=()
+sha256sums=('SKIP'
+ '3ebcebdbe4d5bad832a47109b09f6d9bcd3e02b7a0bb9be2301c8bd630ed706b'
+ '49b419403f4f85e189832f3b89c78c037e7b531541bb67b130764f33c7306224'
+ '3b5e087e200e786ab1a0b79d6f3cd04d4c70fde9337dc8082a13479f477d1025'
+ '60c53790eda57495fefdad2bcc4a6a78198a330e70aeec71abc213edcc8b7036')
+validpgpkeys=()
+
+prepare() {
+ cp -r Data bsf/
+ cp -r Dependencies bsf/
+ cp -r Raw bsf/Data
+
+ rm -rf "$_pkgname"/Dependencies/OpenAL
+ rm -rf "$_pkgname"/Dependencies/libFLAC
+ rm -rf "$_pkgname"/Dependencies/libICU
+ rm -rf "$_pkgname"/Dependencies/libogg
+ rm -rf "$_pkgname"/Dependencies/libvorbis
+ rm -rf "$_pkgname"/Dependencies/freetype
+ rm -rf "$_pkgname"/Dependencies/freeimg
+
+ patch -d bsf -p1 < install-dir.patch
+}
+
+pkgver() {
+ cd "$_pkgname"
+
+ (
+ set -o pipefail
+ git describe --long 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+build() {
+ mkdir -p "$_pkgname"/build
+ cd "$_pkgname"/build
+
+ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DUSE_BUNDLED_LIBRARIES=OFF -G Ninja
+ ninja
+
+ cd ../Documentation/Doxygen
+ doxygen config.doxyconfig
+}
+
+package() {
+ pushd "$_pkgname"/build
+ DESTDIR="$pkgdir"/ ninja install
+ popd > /dev/null
+
+ find "$pkgdir"/usr/lib -name "*.dbg" -delete
+
+ mkdir -p "$pkgdir"/usr/share/licenses/$pkgname
+ install "$_pkgname"/LICENSE.md $pkgdir/usr/share/licenses/$pkgname/
+
+# mkdir -p "$pkgdir"/usr/share/doc/$pkgname
+# cp -r "$_pkgname"/Documentation/Generated/html/* "$pkgdir"/usr/share/doc/$pkgname/
+}
diff --git a/install-dir.patch b/install-dir.patch
new file mode 100644
index 00000000000..e3af1871453
--- /dev/null
+++ b/install-dir.patch
@@ -0,0 +1,40 @@
+diff --git a/Source/CMake/BsEngineConfig.h.in b/Source/CMake/BsEngineConfig.h.in
+index 01a7db342..ff99fdedd 100644
+--- a/Source/CMake/BsEngineConfig.h.in
++++ b/Source/CMake/BsEngineConfig.h.in
+@@ -6,18 +6,9 @@
+ #define BS_PHYSICS_MODULE "@PHYSICS_MODULE_LIB@"
+
+ /** Path to the framework root when files haven't been packaged yet (e.g. running from debugger). */
+-static constexpr const char* RAW_APP_ROOT = "@APP_ROOT_DIR@/";
++static constexpr const char* RAW_APP_ROOT = "@CMAKE_INSTALL_PREFIX@/share/bsf/";
+
+ /** Secondary search path to use when looking for built-in assets (after the RAW_APP_ROOT). */
+ static constexpr const char* SECONDARY_APP_ROOT = "@SECONDARY_APP_ROOT_DIR@/";
+
+-/** Path to the binaries when files haven't been packaged yet (e.g. running from debugger). */
+-#if BS_CONFIG == BS_CONFIG_DEBUG
+-static constexpr const char* BINARIES_PATH = "@CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG@";
+-#elif BS_CONFIG == BS_CONFIG_RELWITHDEBINFO
+-static constexpr const char* BINARIES_PATH = "@CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO@";
+-#elif BS_CONFIG == BS_CONFIG_MINSIZEREL
+-static constexpr const char* BINARIES_PATH = "@CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL@";
+-#elif BS_CONFIG == BS_CONFIG_RELEASE
+-static constexpr const char* BINARIES_PATH = "@CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE@";
+-#endif
++static constexpr const char* BINARIES_PATH = "@CMAKE_INSTALL_PREFIX@/lib/";
+diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
+index 02ba71c5a..ebaac189c 100644
+--- a/Source/CMakeLists.txt
++++ b/Source/CMakeLists.txt
+@@ -193,8 +193,8 @@ check_and_update_builtin_assets(bsfCompiled ${BSF_SOURCE_DIR}/../Data Data ${COM
+
+ ## Install
+ install(
+- DIRECTORY ../Data
+- DESTINATION bin/
++ DIRECTORY ../Data/
++ DESTINATION share/bsf/
+ PATTERN "../Data/Raw" EXCLUDE
+ PATTERN ".version" EXCLUDE
+ PATTERN ".reqversion" EXCLUDE