summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Thomas2023-06-27 13:14:08 +0100
committerGeorge Thomas2023-06-27 13:14:08 +0100
commit040b83a654ff05c3dde1e4d1106056aaf34b3c93 (patch)
treee61ae52e685fd8035270931e87d06c69d875bfd1
downloadaur-040b83a654ff05c3dde1e4d1106056aaf34b3c93.tar.gz
Initial
-rw-r--r--.SRCINFO15
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD26
3 files changed, 45 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..913926d7998d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = wxc
+ pkgdesc = A C wrapper around the wxWidgets C++ library
+ pkgver = 1.0.0.1
+ pkgrel = 1
+ url = https://github.com/georgefst/wxHaskell
+ arch = x86_64
+ license = custom:wxWindows
+ makedepends = git
+ makedepends = cmake
+ depends = gcc
+ depends = wxwidgets
+ source = git+https://github.com/georgefst/wxHaskell#commit=152d1e0f4ead34d76240727fab87185bc0a89c0b
+ sha512sums = SKIP
+
+pkgname = wxc
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..27411daa8520
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+pkg
+src
+wxHaskell
+wxc-*-*.pkg.tar.zst
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..178415fcf35b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,26 @@
+# Maintainer: George Thomas <georgefsthomas@gmail.com>
+pkgname="wxc"
+pkgver="1.0.0.1" # TODO keep this in sync? https://wiki.archlinux.org/title/VCS_package_guidelines#The_pkgver()_function
+pkgrel="1"
+pkgdesc="A C wrapper around the wxWidgets C++ library"
+url="https://github.com/georgefst/wxHaskell"
+arch=("x86_64")
+depends=("gcc" "wxwidgets")
+makedepends=("git" "cmake")
+license=("custom:wxWindows")
+source=("git+${url}#commit=152d1e0f4ead34d76240727fab87185bc0a89c0b") # TODO only clone `wxc` subdir and `license.txt`?
+sha512sums=("SKIP")
+package() {
+ (cd wxHaskell/wxc && ./generate-version-header.sh)
+ cmake -BwxHaskell/build -DCMAKE_INSTALL_PREFIX="${pkgdir}/usr" wxHaskell/wxc
+ (cd wxHaskell/build && make install)
+ install -Dm644 wxHaskell/license.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ # TODO bit of a hack
+ # wxc's current build system bakes in absolute paths earlier than Arch would like
+ # so we just replace the whole first line
+ # TODO we still see a warning, but can't find why and see no issues in practice (maybe just due to relative symlink?):
+ # ==> WARNING: Package contains reference to $srcdir
+ # usr/lib/libwxc.so.1.0.0.1
+ sed -i "1s/.*/prefix=\/usr/" "${pkgdir}/usr/lib/pkgconfig/wxc.pc"
+}