diff options
author | Claudia | 2023-08-23 14:42:28 +0200 |
---|---|---|
committer | Claudia | 2023-09-01 18:24:47 +0200 |
commit | 0b2aaf41c50ca12e940ea90f90752fa690ecbd24 (patch) | |
tree | 1f1bdb491f3d3aaf1c80eeaed1e0ab899e761ae6 | |
download | aur-0b2aaf41c50ca12e940ea90f90752fa690ecbd24.tar.gz |
nesfab v0.9
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | .editorconfig | 23 | ||||
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | PKGBUILD | 67 | ||||
-rw-r--r-- | ada.png | bin | 0 -> 3226 bytes | |||
-rw-r--r-- | version-no-git-commit.patch | 44 |
6 files changed, 162 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ba980f989f26 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = nesfab + pkgdesc = Programming language for creating NES games + pkgver = 0.9 + pkgrel = 1 + url = https://github.com/pubby/nesfab + arch = x86_64 + license = GPL3 + license = Boost + makedepends = boost + depends = bash + depends = boost-libs + depends = gcc-libs + depends = glibc + source = nesfab-0.9.tar.gz::https://github.com/pubby/nesfab/archive/v0.9.tar.gz + source = version-no-git-commit.patch + source = ada.png + sha512sums = 11ca2cb207130d6de44e131302fe25b37425a1ebe0202e71b64e6ff7b56a03571ada0f86e1ab4440c52ab62a7d35917994fda413061b28dc8de2e5c3bb1da776 + sha512sums = 40e42e4067c94f7c384111e28b9361c7b60687686e97759cffdb2024dcd43c8d1fbbb28307b73bcd2fe783fe230221ca9eb72c96c5b8a4e75b24e9d52a1486f3 + sha512sums = 74f6199454f64ed2f4a4ba998bf11b1bab07d3944b35c49827f64cdf233e318393e4d93a954b8c39504b814db8ebe68d72b72566afecd3e275739d9b0afa194a + +pkgname = nesfab diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000000..d2e3743172f0 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,23 @@ +# https://editorconfig.org + +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{diff,patch}] +end_of_line = lf +trim_trailing_whitespace = false + +[PKGBUILD] +indent_size = 2 + +[*.cpp] +trim_trailing_whitespace = false + +[*.json] +indent_size = 2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..37dd117487ab --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +/.vscode/ +/src +/pkg +*.log +*.pkg.* +*.tar.* +*.zip diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4e175f8a86b0 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,67 @@ +# Maintainer: Claudia Pellegrino <aur ät cpellegrino.de> + +pkgname=nesfab +pkgver=0.9 +pkgrel=1 +pkgdesc='Programming language for creating NES games' +arch=('x86_64') +url='https://github.com/pubby/nesfab' +license=('GPL3' 'Boost') +depends=('bash' 'boost-libs' 'gcc-libs' 'glibc') +makedepends=('boost') + +source=( + "${pkgname}-${pkgver}.tar.gz::https://github.com/pubby/nesfab/archive/v${pkgver}.tar.gz" + 'version-no-git-commit.patch' + 'ada.png' +) + +sha512sums=( + '11ca2cb207130d6de44e131302fe25b37425a1ebe0202e71b64e6ff7b56a03571ada0f86e1ab4440c52ab62a7d35917994fda413061b28dc8de2e5c3bb1da776' + '40e42e4067c94f7c384111e28b9361c7b60687686e97759cffdb2024dcd43c8d1fbbb28307b73bcd2fe783fe230221ca9eb72c96c5b8a4e75b24e9d52a1486f3' + '74f6199454f64ed2f4a4ba998bf11b1bab07d3944b35c49827f64cdf233e318393e4d93a954b8c39504b814db8ebe68d72b72566afecd3e275739d9b0afa194a' +) + +prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + + # Remove dependency on Git commit, which is unknown to this build + patch -p1 < ../version-no-git-commit.patch + + # https://pursuit.unimelb.edu.au/articles/it-s-time-to-retire-lena-from-computer-science + cp -v ../ada.png examples/pbz/bg.png + + # Tweak example script so it expects the executable to live in /usr/bin + # shellcheck disable=SC2016 + sed -i 's#\.\./nesfab #/usr/bin/nesfab "$(dirname "${BASH_SOURCE[0]}")"/#' \ + examples/build_all.sh +} + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + make 'CXXFLAGS=-Wl,-z,now' release +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + echo >&2 'Packaging documentation' + install -D -m 644 -t "${pkgdir}/usr/share/doc/${pkgname}" doc/doc.adoc + cp -R --preserve=mode syntax_highlighting \ + "${pkgdir}/usr/share/doc/${pkgname}" + + echo >&2 'Packaging executable' + install -D -m 755 -t "${pkgdir}/usr/bin" nesfab + + echo >&2 'Packaging examples and library' + mkdir -p "${pkgdir}/usr/share/${pkgname}" + cp -R --preserve=mode examples lib "${pkgdir}/usr/share/${pkgname}" + + echo >&2 'Packaging environment additions' + mkdir -p "${pkgdir}/etc/profile.d" + echo 'export NESFAB=/usr/share/nesfab' \ + > "${pkgdir}/etc/profile.d/${pkgname}.sh" + + echo >&2 'Packaging the licenses' + install -D -m 644 -t "${pkgdir}/usr/share/licenses/${pkgname}" \ + COPYING doc/LICENSE_1_0.txt +} diff --git a/ada.png b/ada.png Binary files differnew file mode 100644 index 000000000000..e795353ad49e --- /dev/null +++ b/ada.png diff --git a/version-no-git-commit.patch b/version-no-git-commit.patch new file mode 100644 index 000000000000..cf4294761397 --- /dev/null +++ b/version-no-git-commit.patch @@ -0,0 +1,44 @@ +diff --git a/Makefile b/Makefile +index 723321d..542f94a 100644 +--- a/Makefile ++++ b/Makefile +@@ -29,7 +29,6 @@ OBJDIR:=obj + INCS:=-I$(SRCDIR) + + VERSION := "0.9" +-GIT_COMMIT := "$(shell git describe --all --abbrev=8 --dirty --always)" + + #override CXX:=clang++ + +@@ -46,8 +45,7 @@ override CXXFLAGS+= \ + -ftemplate-depth=100 \ + -pipe \ + $(INCS) \ +- -DVERSION=\"$(VERSION)\" \ +- -DGIT_COMMIT=\"$(GIT_COMMIT)\" ++ -DVERSION=\"$(VERSION)\" + + ifndef ARCH + ARCH=AMD64 +diff --git a/src/main.cpp b/src/main.cpp +index 1b5b8ed..b7af82e 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -28,8 +28,6 @@ + #include "macro.hpp" + #include "guard.hpp" + +-extern char __GIT_COMMIT; +- + namespace po = boost::program_options; + namespace fs = std::filesystem; + +@@ -317,7 +315,7 @@ int main(int argc, char** argv) + + if(vm.count("version")) + { +- std::cout << "NesFab " << VERSION << " (" << GIT_COMMIT << ", " << __DATE__ << ")\n"; ++ std::cout << "NesFab " << VERSION << " (" << __DATE__ << ")\n"; + std::cout << + "Copyright (C) 2023, Patrick Bene\n" + "This is free software. " |