26

Re: [Collection] Compilation of packages and ports (not in repositories)

Package sile

(as possible replacement for LaTex)

PKGBUILD

# Maintainer: Tobias Dausend <throgh@hyperbola.info>

pkgname=sile
pkgdesc="Free and libre typesetting engine, fully customizable in Lua"
pkgver=0.9.4
pkgrel=1
arch=('i686' 'x86_64')
url='https://www.sile-typesetter.org'
license=('Expat')
_luadeps=(lpeg
          filesystem
          compat53
          expat)
depends=("${_luadeps[@]/#/lua51-}" 'fontconfig' 'freetype2' 'ttf-gentium'
         'glibc' 'harfbuzz' 'icu' 'libpng' 'luajit' 'zlib')
source=("https://github.com/sile-typesetter/sile/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.bz2")
sha512sums=('194a6279aa2cd21772fb20adfd20e0d92e95fe652f9ba193e26d872bb5f9b5367f0e6cd15228f7a077881b510d82cc8fe7d0e90b40236fa0d4590971c6824108')

build () {
  cd "${pkgname}-${pkgver}"
  ./configure \
    --prefix /usr \
    --docdir /usr/share/doc/$pkgname
  make all
}

package () {
  cd "${pkgname}-${pkgver}"
  make install DESTDIR="$pkgdir"
  install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

27

Re: [Collection] Compilation of packages and ports (not in repositories)

Package mariadb

We have removed mariadb out of the reasoning of being not fully compliant to community-oriented software. Sharing now the removed data from the commit here: https://git.hyperbola.info:50100/~team/ … 1d9aede210
Perhaps there is interest to create further packages from and for the community in a separate repository.

PKGBUILD

# Maintainer (Arch): Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Maintainer (Arch): Christian Hesse <mail@eworm.de>
# Maintainer: André Silva <emulatorman@hyperbola.info>
# Contributor: Tobias Dausend <throgh@hyperbola.info>

pkgbase=mariadb
pkgname=('mariadb-libs' 'mariadb-clients' 'mariadb' 'mytop')
pkgver=10.3.24
_debver=$pkgver
_debrel=2
pkgrel=9
arch=('i686' 'x86_64')
license=('GPL-2')
url='https://mariadb.org/'
makedepends=('boost' 'bzip2' 'cmake' 'jemalloc' 'libaio' 'libxcrypt' 'libressl' 'libxml2'
             'lz4' 'lzo' 'zlib' 'quilt')
source=("https://archive.mariadb.org/mariadb-$pkgver/source/mariadb-$pkgver.tar.gz"{,.asc}
        "https://repo.hyperbola.info:50000/sources/${pkgbase}/${pkgbase}-10.3_$_debver-$_debrel.debian.tar.xz"{,.sig}
        "mariadb.initd"
        "mariadb.run"
        "mariadb_log.run"
        "fix-cmake.patch")
sha512sums=('cfd0154d984ddc344554cd3df1d02b0811f8e35c90caf745532491688850736d079c67d40e9414daba83f2bd0c06569bfc99213d5280c63cf051c68abd7c56b5'
            'SKIP'
            'f406e0d7f85654ad33ef2f9722ca40b4763b882d83083b547aead7f6033813c424cdae9b986351edf415c4eaff8f6a43cd5039ad2d98b962395018b8702cf3fd'
            'SKIP'
            '5661610576977b87b5435a304d8409962c4451389d6cd6801666c507e871e9182c37b56daa37c580a62ccf60ebfff34a9c1dc85da62a2dac5a69b8776c218020'
            '208f1246a3fc7478262e6a7d8e6d82d83377d8fd86ef7a7f3a03e2c2383367b9c0560e2ecbb4e686e4b6d64e48bb29f2b75780e4e449a4146fcb3d95e2e67c60'
            'ceccc2ceae499524322ec99d3929e088aaed4f94e52274d8a1691a22c0a322781dc93ac00fb28a91f3d0d1541e95de95d588d91011c4b0293b322c5f49d5fd69'
            '15179f2e10bd18612ad03d332cc27bde7751c29a7a0bd6661745f43370f93b947138618ab11f7c43831f47f1324538d563962d465b75e23b03f58eb558f194a3')
validpgpkeys=('199369E5404BD5FC7D2FE43BCBCB082A1BB943DB'  # MariaDB Package Signing Key <package-signing-key@mariadb.org>
              'C92BAA713B8D53D3CAE63FC9E6974752F9704456') # André Silva

prepare() {
  cd $pkgbase-$pkgver/

  if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
    # Debian patches
    export QUILT_PATCHES=debian/patches
    export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
    export QUILT_DIFF_ARGS='--no-timestamps'

    rm -r debian
    mv "$srcdir"/debian .

    quilt push -av
  fi
  patch -Np1 -i ${srcdir}/fix-cmake.patch
}

build() {
  local _cmake_options=(
    # build options
    -DCMAKE_BUILD_TYPE=RelWithDebInfo
    -Wno-dev

    # file paths
    # /etc
    -DINSTALL_SYSCONFDIR=/etc
    -DINSTALL_SYSCONF2DIR=/etc/my.cnf.d
    # /run
    -DINSTALL_UNIX_ADDRDIR=/run/mysqld/mysqld.sock
    # /usr
    -DCMAKE_INSTALL_PREFIX=/usr
    # /usr/bin /usr/include
    -DINSTALL_SCRIPTDIR=bin
    -DINSTALL_INCLUDEDIR=include/mysql
    # /usr/lib
    -DINSTALL_PLUGINDIR=lib/mysql/plugin
    # /usr/share
    -DINSTALL_SHAREDIR=share
    -DINSTALL_SUPPORTFILESDIR=share/mysql
    -DINSTALL_MYSQLSHAREDIR=share/mysql
    -DINSTALL_DOCREADMEDIR=share/doc/mariadb
    -DINSTALL_DOCDIR=share/doc/mariadb
    -DINSTALL_MANDIR=share/man
    # /var
    -DMYSQL_DATADIR=/var/lib/mysql

    # default settings
    -DDEFAULT_CHARSET=utf8mb4
    -DDEFAULT_COLLATION=utf8mb4_unicode_ci

    # features
    -DENABLED_LOCAL_INFILE=ON
    -DPLUGIN_EXAMPLE=NO
    -DPLUGIN_FEDERATED=NO
    -DPLUGIN_FEEDBACK=NO
    -DWITH_EMBEDDED_SERVER=ON
    -DWITH_EXTRA_CHARSETS=complex
    -DWITH_LIBWRAP=OFF
    -DWITH_PCRE=bundled
    -DWITH_READLINE=ON
    -DWITH_JEMALLOC=system
    -DWITH_SSL=system
    -DWITH_SYSTEMD=no
    -DWITH_UNIT_TESTS=OFF
    -DWITH_ZLIB=system
  )

  mkdir build
  cd build

  cmake ../"$pkgbase-$pkgver" "${_cmake_options[@]}"

  make
}

package_mariadb-libs() {
  pkgdesc='MariaDB libraries'
  depends=('bzip2' 'libaio' 'libxcrypt' 'libressl' 'lz4' 'lzo' 'xz' 'zlib')
  conflicts=('libmysqlclient' 'libmariadbclient' 'mariadb-connector-c')
  provides=('libmariadbclient' 'mariadb-connector-c')
  replaces=('libmariadbclient')

  cd build

  for dir in libmariadb libmysqld libservices include; do
    make -C $dir DESTDIR="$pkgdir" install
  done

  ln -s mariadb_config "$pkgdir"/usr/bin/mysql_config
  install -D -m0644 "$srcdir"/$pkgbase-$pkgver/man/mysql_config.1 "$pkgdir"/usr/share/man/man1/mysql_config.1

  install -D -m0644 support-files/mariadb.pc "$pkgdir"/usr/share/pkgconfig/mariadb.pc
  install -D -m0644 "$srcdir"/$pkgbase-$pkgver/support-files/mysql.m4 "$pkgdir"/usr/share/aclocal/mysql.m4

  # remove static libraries
  rm "$pkgdir"/usr/lib/*.a

  # install license files
  install -dm0755 "$pkgdir"/usr/share/licenses/$pkgname
  install -m0644 "$srcdir"/$pkgbase-$pkgver/COPYING* "$pkgdir"/usr/share/licenses/$pkgname
}

package_mariadb-clients() {
  pkgdesc='MariaDB client tools'
  depends=("mariadb-libs=${pkgver}" 'jemalloc')
  conflicts=('mysql-clients')
  provides=("mysql-clients=$pkgver")

  cd build

  make -C client DESTDIR="$pkgdir" install

  # install man pages
  for man in mysql mysql_plugin mysql_upgrade mysqladmin mysqlbinlog mysqlcheck mysqldump mysqlimport mysqlshow mysqlslap mysqltest; do
    install -D -m0644 "$srcdir"/$pkgbase-$pkgver/man/$man.1 "$pkgdir"/usr/share/man/man1/$man.1
  done

  # install license files
  install -dm0755 "$pkgdir"/usr/share/licenses/$pkgname
  install -m0644 "$srcdir"/$pkgbase-$pkgver/COPYING* "$pkgdir"/usr/share/licenses/$pkgname
}

package_mariadb() {
  pkgdesc='Fast SQL database server, drop-in replacement for MySQL'
  backup=('etc/my.cnf'
          'etc/my.cnf.d/client.cnf'
          'etc/my.cnf.d/enable_encryption.preset'
          'etc/my.cnf.d/mysql-clients.cnf'
          'etc/my.cnf.d/server.cnf')
  install=mariadb.install
  depends=("mariadb-clients=${pkgver}" 'inetutils' 'libxml2')
  optdepends=('perl-dbd-mysql: for mysqlhotcopy, mysql_convert_table_format and mysql_setpermission'
              'logger: message logging support')
  conflicts=('mysql')
  provides=("mysql=$pkgver")
  options=('emptydirs')

  cd build

  make DESTDIR="$pkgdir" install

  cd "$pkgdir"

  rm -r etc/init.d
  rm usr/bin/rcmysql
  rm usr/share/mysql/{binary-configure,mysql{,d_multi}.server}

  install -Dm0755 "${srcdir}"/mariadb.initd etc/init.d/mariadb

  install -Dm0755 "${srcdir}"/mariadb.run etc/sv/mariadb/run
  install -Dm0755 "${srcdir}"/mariadb_log.run etc/sv/mariadb/log/run

  install -dm0700 var/lib/mysql
  chown -R 89:89 var/lib/mysql &>/dev/null

  # move mysqld to /usr/sbin
  install -dm0755 usr/sbin
  mv usr/{,s}bin/mysqld

  # install license files
  install -dm0755 "$pkgdir"/usr/share/licenses/$pkgname
  install -m0644 "$srcdir"/$pkgbase-$pkgver/COPYING* "$pkgdir"/usr/share/licenses/$pkgname

  # move it where one might look for it
  mv usr/share/{groonga{,-normalizer-mysql},doc/mariadb/}

  # provided by mariadb-libs
  rm usr/bin/mariadb_config
  rm usr/bin/mysql_config
  rm -r usr/include/
  rm usr/share/man/man1/mysql_config.1
  rm -r usr/share/aclocal
  rm usr/lib/lib*
  rm usr/lib/mysql/plugin/{auth_gssapi_client,caching_sha2_password,client_ed25519,dialog,mysql_clear_password,sha256_password}.so
  rm -r usr/lib/pkgconfig/

  # provided by mariadb-clients
  rm usr/bin/{mysql,mysql_plugin,mysql_upgrade,mysqladmin,mysqlbinlog,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap,mysqltest}
  rm usr/share/man/man1/{mysql,mysql_plugin,mysql_upgrade,mysqladmin,mysqlbinlog,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap,mysqltest}.1

  # provided by mytop
  rm usr/bin/mytop

  # not needed
  rm -r usr/{data,mysql-test,sql-bench}
  rm usr/share/man/man1/mysql-test-run.pl.1
}

package_mytop() {
  pkgdesc='Top clone for MariaDB'
  depends=('perl' 'perl-dbd-mysql' 'perl-term-readkey')

  cd build

  install -Dm0755 scripts/mytop "$pkgdir"/usr/bin/mytop

  # install license files
  install -dm0755 "$pkgdir"/usr/share/licenses/$pkgname
  install -m0644 "$srcdir"/$pkgbase-$pkgver/COPYING* "$pkgdir"/usr/share/licenses/$pkgname
}

fix-cmake.patch

--- a/libmariadb/cmake/ConnectorName.cmake    2020-08-06 17:15:46.000000000 +0200
+++ b/libmariadb/cmake/ConnectorName.cmake    2023-01-22 10:49:08.416903691 +0100
@@ -11,18 +11,22 @@
   SET(IS64 1)
 ENDIF()
 
-SET (PLAFORM_NAME CMAKE_SYSTEM_NAME)
-SET (MACHINE_NAME CMAKE_SYSTEM_PROCESSOR)
+SET (PLATFORM_NAME ${CMAKE_SYSTEM_NAME})
+SET (MACHINE_NAME ${CMAKE_SYSTEM_PROCESSOR})
 SET (CONCAT_SIGN "-")
 
 IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
   SET(PLATFORM_NAME "win")
   SET(CONCAT_SIGN "")
   IF(IS64)
-    SET(MACHINE_NAME "x64")
+    IF(CMAKE_C_COMPILER_ARCHITECTURE_ID)
+      STRING(TOLOWER "${CMAKE_C_COMPILER_ARCHITECTURE_ID}" MACHINE_NAME)
+    ELSE()
+      SET(MACHINE_NAME x64)
+    ENDIF()
   ELSE()
     SET(MACHINE_NAME "32")
-  END()
+  ENDIF()
 ENDIF()
 
 SET(product_name "mysql-connector-c-${CPACK_PACKAGE_VERSION}-${PLATFORM_NAME}${CONCAT_SIGN}${MACHINE_NAME}")

mariadb.initd

#!/sbin/openrc-run
# Copyright 2018 Hyperbola Project
# Distributed under the terms of the GNU General Public License v2

getconf() {
    v=$(my_print_defaults --mysqld | grep ^--$1)
    [ -z $v ] && echo $2 || echo ${v#*=}
}

retry="60"
command="/usr/bin/mysqld_safe"
command_args="--syslog --nowatch"
command_user="mysql"

depend() {
    use logger net
    need localmount
}

start_pre() {
    pidfile=$(getconf pid-file "/run/mysqld/mysqld.pid")
    command_args="$command_args --pid-file=$pidfile"
    required_dirs=$(getconf datadir "/var/lib/mysql")
    if [ ! -d $required_dirs/mysql ]; then
        eerror "Datadir '$required_dirs' is empty or invalid."
        eerror "Run 'mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql' to create a new database."
    fi
    checkpath --directory --owner mysql:mysql --mode 0755 /run/mysqld
}

start_post() {
    ewaitfile 10 $(getconf socket "/run/mysqld/mysqld.sock")
}

stop_pre() {
    pidfile=$(getconf pid-file "/run/mysqld/mysqld.pid")
}

mariadb.install

post_install(){
  if ! getent group mysql &>/dev/null; then
    groupadd -g 89 mysql >/dev/null
  fi
  if ! getent passwd mysql &>/dev/null; then
    useradd -u 89 -g 89 -d /var/lib/mysql -s /bin/nologin mysql >/dev/null
  fi
  if ! groups mysql | grep adm &>/dev/null; then
    gpasswd -a mysql adm >/dev/null
  fi
  mysql_shell=$(getent passwd mysql | cut -d: -f7)
  if [ "$mysql_shell" != '/bin/nologin' ]; then
    chsh -s /bin/nologin mysql &>/dev/null
  fi

  echo ":: You need to initialize the MariaDB data directory prior to starting"
  echo "   the service. This can be done with mysql_install_db command, e.g.:"
  echo "   mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql"
}

post_upgrade(){
  if ! getent group mysql &>/dev/null; then
    groupadd -g 89 mysql >/dev/null
  fi
  if ! getent passwd mysql &>/dev/null; then
    useradd -u 89 -g 89 -d /var/lib/mysql -s /bin/nologin mysql >/dev/null
  fi
  if ! groups mysql | grep adm &>/dev/null; then
    gpasswd -a mysql adm >/dev/null
  fi
  mysql_shell=$(getent passwd mysql | cut -d: -f7)
  if [ "$mysql_shell" != '/bin/nologin' ]; then
    chsh -s /bin/nologin mysql &>/dev/null
  fi

  if [[ "$(vercmp $2 5.5.25-4)" -lt 0 ]] && [[ -d /data ]]; then
    for x in data/*; do
      cp -r $x /var/lib/mysql
    done
    rm -rf data
  fi
}

post_remove() {
  if getent passwd mysql &>/dev/null; then
    userdel mysql >/dev/null
  fi
  if getent group mysql &>/dev/null; then
    groupdel mysql >/dev/null
  fi
}

mariadb.run

#!/bin/sh
[ ! -d /run/mysqld ] && mkdir -p /run/mysqld
chown mysql:mysql /run/mysqld
exec chpst -U mysql:mysql mysqld --user=mysql 2>&1
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

28

Re: [Collection] Compilation of packages and ports (not in repositories)

Package perl-dbd-mysql

PKGBUILD

# Maintainer (Arch): Felix Yan <felixonmars@archlinux.org>
# Contributor (Arch): Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor (Arch): kevin <kevin@archlinux.org>
# Contributor (Arch): Eric Johnson <eric@coding-zone.com>
# Maintainer: André Silva <emulatorman@hyperbola.info>

pkgname=perl-dbd-mysql
pkgver=4.050
_debver=4.050
_debrel=3
pkgrel=1
pkgdesc='Perl/CPAN DBD::mysql module for interacting with MySQL via DBD'
arch=('i686' 'x86_64')
license=('GPL-1')
url="https://metacpan.org/release/DBD-mysql"
depends=('mariadb-libs' 'perl-dbi')
makedepends=('perl-devel-checklib' 'quilt')
checkdepends=('mariadb' 'perl-test-deep')
options=('!emptydirs')
source=(https://search.cpan.org/CPAN/authors/id/D/DV/DVEEDEN/DBD-mysql-${pkgver}.tar.gz
        https://deb.debian.org/debian/pool/main/libd/libdbd-mysql-perl/libdbd-mysql-perl_$_debver-$_debrel.debian.tar.xz
        mariadb-10.3.13-zerofill.patch)
sha512sums=('910f5b4ba7a7890d50a79f37d04ec8971a4f62acd0fe30bf3ab634f66e3128f0cd6513e5c9da8c807a0f4477d0cc766682ea8dd0d8072d02821b78df51f37879'
            '91a2f1e0137228d23a07271a6f2231c3c1966ef4d8d39407117942409f4ac94b089710f846f6f845d3dc1faa28a9eeaa9b89be228c388179060b279d50de7344'
            '090039d383d05958c5d0cf23f13b8062ba89158583ca6dad9ce7c72b28bc3eccc039d4f815aef13592ea35a57662c80156b25aaa04ace171d64a15f5ac489a09')

prepare() {
  cd DBD-mysql-$pkgver

  if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
    # Debian patches
    export QUILT_PATCHES=debian/patches
    export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
    export QUILT_DIFF_ARGS='--no-timestamps'

    mv "$srcdir"/debian .

    quilt push -av
  else
    # https://github.com/perl5-dbi/DBD-mysql/issues/304
    patch -Np1 -i ../mariadb-10.3.13-zerofill.patch
  fi
}

build() {
  cd DBD-mysql-$pkgver
  perl Makefile.PL INSTALLDIRS=vendor --testsocket=/tmp/socket.mysql
  make
}

check() {
  cd DBD-mysql-$pkgver
  mkdir -p /tmp/mysql_test
  mysql_install_db \
     --basedir=/usr \
     --datadir=/tmp/mysql_test
  mysqld -P 17999 \
     --socket=/tmp/socket.mysql \
     --datadir=/tmp/mysql_test &
  sleep 10
  DAEMON_PORT=$!
  make test
  kill -9 $DAEMON_PORT
}

package() {
  cd DBD-mysql-$pkgver
  make install DESTDIR="$pkgdir"
  install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
}

mariadb-10.3.13-zerofill.patch

From 19734814ed4beeebd48180ad4c123047e3743ff2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= <git@myname.nl>
Date: Tue, 5 Mar 2019 16:24:17 +0100
Subject: [PATCH] Fix for MariaDB 10.3.13 with zerofil

Issue: #304
---
 dbdimp.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dbdimp.c b/dbdimp.c
index a9c37cf..0cea5c8 100644
--- a/dbdimp.c
+++ b/dbdimp.c
@@ -4055,9 +4055,13 @@ int dbd_describe(SV* sth, imp_sth_t* imp_sth)
         break;
 
       default:
-#if MYSQL_VERSION_ID > 100300
+#if (MYSQL_VERSION_ID > 100300) && (MYSQL_VERSION_ID < 10313)
         // https://jira.mariadb.org/browse/MDEV-18143
         buffer->buffer_length= fields[i].max_length ? fields[i].max_length : 2;
+#elif MYSQL_VERSION_ID > 100312
+        // https://jira.mariadb.org/browse/MDEV-18823
+        buffer->buffer_length= fields[i].max_length ? fields[i].max_length + 1 : 2;
+        buffer->buffer_length= fields[i].length > fields[i].max_length ? fields[i].length + 1 : 2;
 #else
         buffer->buffer_length= fields[i].max_length ? fields[i].max_length : 1;
 #endif
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

29

Re: [Collection] Compilation of packages and ports (not in repositories)

Package iec16022

PKGBUILD

# Maintainer (Arch): Balló György <ballogyor+arch at gmail dot com>
# Maintainer: Tobias Dausend <throgh@hyperbola.info>

pkgname=iec16022
pkgver=0.3.1
pkgrel=1
pkgdesc='Produce 2D barcodes often also referenced as DataMatrix'
arch=('i686' 'x86_64')
url='https://rdoeffinger.github.io/'
license=('GPL-2')
depends=('popt' 'zlib')
source=("https://github.com/rdoeffinger/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.xz")
sha512sums=('90044be3b4b8750a7c99399c33084612dc58912b138789239dbabdab7cc2d526040e325f7ade7b129aa14ee044cf032c6b928dc2b4761b48de6cd17b3051416c')

build() {
  cd $pkgname-$pkgver
  ./configure \
    --prefix=/usr
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  install -Dm644 COPYING -t "$pkgdir/usr/share/licenses/$pkgname"
}
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

30

Re: [Collection] Compilation of packages and ports (not in repositories)

Package lzdoom

PKGBUILD

# Maintainer (Arch): Lawrence González <pentestian [at] airmail [dot] cc>
# Contributor (Arch): Jan Cholasta <grubber at grubber cz>
# Maintainer: Tobias Dausend <throgh@hyperbola.info>

_name=gzdoom
pkgname=lzdoom
pkgver=3.88
pkgrel=1
pkgdesc="Advanced Doom source port with OpenGL support (legacy version)"
arch=('i686' 'x86_64')
url='http://www.zdoom.org/'
license=('Modified-BSD' 'custom:dumb' 'custom:bzip2' 'GPL-3' 'LGPL-3' 'Expat')
depends=('hicolor-icon-theme' 'libjpeg-turbo' 'sdl2' 'alsa-lib')
makedepends=('cmake' 'fluidsynth>=2' 'gtk' 'graphicsmagick')
optdepends=('fluidsynth>=2: FluidSynth MIDI device'
            'freedoom: Freedoom game data'
            'freedm: FreeDM game data'
            'blasphemer: Blasphemer game data'
            'gtk: IWAD selection dialog'
            'libsndfile: WAV/FLAC/OGG audio support'
            'mpg123: MP3 audio support'
            'openal: in-game sound'
            'soundfont-fluid: FluidR3 soundfont for FluidSynth'
            'xenocara-xmessage: crash dialog (other)')
groups=('games')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/drfrag666/${_name}/archive/refs/tags/${pkgver}.tar.gz"
        "${pkgname}.desktop")
sha512sums=('0b883991b35bbe44943404a04e59f47848bbd9ffc7d6b4949a2c6f1f365a90e116a567f3b276697e83587e991c385c32f9ee1d7c6bb86776400dfbdf2606018b'
            '0c5d97ec8e43ea65c62a5bbf261c016beaf8144bfa521e17540db563df165c17569829e4d83a4b9e55900b0620efe6a788ff2c828fd24b3918f3bc0349d16bda')

prepare() {
  cd "$srcdir/${_name}-$pkgver"

  # Patches GCC 11 errors
  sed -i '/^#include "types.h"$/a \#include <limits>' src/scripting/types.cpp

  # Patches soundfonts paths
  sed -i -f - src/gameconfigfile.cpp <<- "EOF"
        \%^\t\tSetValueForKey("Path", "/usr/share/games/doom/fm_banks", true);$% a \
        \t\tSetValueForKey("Path", SHARE_DIR "/soundfonts", true);\
        \t\tSetValueForKey("Path", SHARE_DIR "/fm_banks", true);\
        \t\tSetValueForKey("Path", "/usr/share/soundfonts", true);
        EOF
}

build() {
  cd "$srcdir/${_name}-$pkgver"

  local _cflags="-ffile-prefix-map=\"$PWD\"=. \
                 -DSHARE_DIR=\\\"/usr/share/games/$pkgname\\\" \
                 -DFLUIDSYNTHLIB2=\\\"libfluidsynth.so.2\\\""
  cmake -DCMAKE_BUILD_TYPE=Release \
                 -DCMAKE_C_FLAGS="${CFLAGS} ${_cflags}" \
                 -DCMAKE_CXX_FLAGS="${CXXFLAGS} ${_cflags}" \
                 -DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS} -Wl,-z,noexecstack" \
                 -DCMAKE_INSTALL_PREFIX=/usr \
                 -DINSTALL_PATH=games \
                 -DINSTALL_PK3_PATH="share/games/$pkgname" \
                 .
  make
}

package() {
  cd "$srcdir/${_name}-$pkgver"

  make install DESTDIR="$pkgdir"
  install -D -m644 "soundfonts/${pkgname}.sf2" \
    "$pkgdir/usr/share/games/$pkgname/soundfonts/${pkgname}.sf2"
  install -D -m644 fm_banks/GENMIDI.GS.wopl \
    "$pkgdir/usr/share/games/$pkgname/fm_banks/GENMIDI.GS.wopl"
  install -D -m644 fm_banks/gs-by-papiezak-and-sneakernets.wopn \
    "$pkgdir/usr/share/games/$pkgname/fm_banks/gs-by-papiezak-and-sneakernets.wopn"

  install -D -m644 "$srcdir/${pkgname}.desktop" \
    "$pkgdir/usr/share/applications/${pkgname}.desktop"
  for SIZE in 16 24 32 48 64 96 128 256; do
    # set modify/create for reproducible builds
    gm convert -scale ${SIZE} +set date:create +set date:modify \
      "ico_${pkgname}.png" \
      "${srcdir}"/$pkgname.png
    install -Dm644 "${srcdir}"/$pkgname.png "${pkgdir}/usr/share/icons/hicolor/${SIZE}x${SIZE}/apps/$pkgname.png"
  done

  install -D -m644 -t "$pkgdir/usr/share/licenses/$pkgname" docs/licenses/*
}

lzdoom.desktop

[Desktop Entry]
Type=Application
Version=1.0
Name=LZDoom
Comment=Advanced Doom source port with OpenGL.
Icon=lzdoom
Exec=lzdoom %F
Terminal=false
MimeType=application/x-doom-wad;
Categories=Game;ActionGame;
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

31

Re: [Collection] Compilation of packages and ports (not in repositories)

Package perp

PKGBUILD

# Maintainer: Tobias Dausend <throgh@hyperbola.info>

pkgname=perp
pkgver=2.07
pkgrel=1
arch=('i686' 'x86_64')
pkgdesc="Perp, a persistent process supervisor"
url='http://b0llix.net/perp/'
license=('Simplified-BSD')
install=$pkgname.install
source=("http://b0llix.net/perp/distfiles/$pkgname-$pkgver.tar.gz")
sha512sums=('7b9ddd5b72ac88f34598ffe82e5cb1cc460a1d84daa6d52222aaa3ce891e7fa9b12839fc87cae80c913349684ec369155bae3955a8d06067859b57bbd4818c7e')

build() {
  cd $srcdir/$pkgname-$pkgver
  make
}

package() {
  cd $srcdir/$pkgname-$pkgver
  make DESTDIR=$pkgdir install
  install -Dm644 LICENSE -t $pkgdir/usr/share/licenses/$pkgname
}

perp.install

post_install() {
echo " >> to activate perp, run the commands "
echo " >> # perp-setup /etc/perp"
echo " >> # kill -HUP 1"
echo " >> become familiar with perp's configuration and operation. skim the manual pages for perp_intro(8), perpd(8), and perpetrate(5)."
}

post_upgrade() {
echo " >> If upgrading a previous perp installation, follow all the steps above. The perp-setup(8) utility script will not disturb any previous 
configuration it finds in any of /etc/inittab, /etc/rc.local, or /etc/perp/.boot."
echo " >> As a special case, if upgrading from perp-0.00 to a later release in"
echo " >> the perp-2.* series, it will be necessary to remove a couple of old"
echo " >> files from the earlier release manually. These are:"
echo " >> /usr/sbin/perpetrate"
echo " >> /usr/share/man/man8/perpetrate.8"
} 
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

32

Re: [Collection] Compilation of packages and ports (not in repositories)

Package wesnoth-legacy

PKGBUILD

# Maintainer (Arch): Sven-Hendrik Haase <svenstaro@gmail.com>
# Contributor (Arch): Jan de Groot <jgc@archlinux.org>
# Contributor (Arch): Tobias Powalowski <tpowa@archlinux.org>
# Contributor (Arch): Jacobo Arvelo <unix4all@ya.com>
# Contributor (Arch): Douglas Soares de Andrade <douglas@archlinux.org>
# Maintainer: Tobias Dausend <throgh@hyperbola.info>

_realpkgname=wesnoth
pkgname=$_realpkgname-legacy
pkgver=1.16.9
pkgrel=1
pkgdesc="A free, libre and turn-based strategy game on a fantasy world (legacy version)"
arch=('i686' 'x86_64')
license=('GPL-2')
url='https://github.com/wesnoth/wesnoth'
depends=('sdl2_ttf' 'sdl2_net' 'sdl2_mixer' 'sdl2_image' 'fribidi' 'boost-libs' 'pango' 'lua' 'tauthon')
makedepends=('boost' 'cmake' 'intltool' 'gettext-tiny')
groups=('games')
options=(!emptydirs)
source=("${_realpkgname}-${pkgver}.tar.gz::https://github.com/wesnoth/wesnoth/archive/refs/tags/${pkgver}.tar.gz")
sha512sums=('313aaad95c66757a952c00f1e5a515ce61bcf7564d6555802bc2619714d038a9a5607f3395e3e8afe5f216205e5b9b07b651789a749b4de37b30f8b8a47cb47f')

build() {
  cmake \
    -S $_realpkgname-$pkgver \
    -B build \
    -DCMAKE_INSTALL_PREFIX="/usr/" \
    -DCMAKE_INSTALL_BINDIR="/usr/games" \
    -DCMAKE_INSTALL_DATAROOTDIR="/usr/share/games" \
    -DCMAKE_INSTALL_MANDIR="/usr/share/man" \
    -DDATADIRNAME="wesnoth" \
    -DLOCALEDIR="locale" \
    -DENABLE_DISPLAY_REVISION=OFF
  make -C build
}

package() {
  make DESTDIR="$pkgdir" -C build install

  # correcting wrong folder-location
  mv "$pkgdir/usr/share/games/"{applications,doc,icons,metainfo} "$pkgdir/usr/share"

  # license
  install -Dm644 "$srcdir/$_realpkgname-$pkgver/COPYING" -t "${pkgdir}/usr/share/licenses/$pkgname"
}
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

33

Re: [Collection] Compilation of packages and ports (not in repositories)

Package sbcl-legacy

PKGBUILD

# Maintainer (Arch): Juergen Hoetzel <juergen@archlinux.org>
# Contributor (Arch): John Proctor <jproctor@prium.net>
# Contributor (Arch): Daniel White <daniel@whitehouse.id.au>
# Contributor (Arch): Leslie Polzer (skypher)
# Maintainer: Tobias Dausend <throgh@hyperbola.info>

_realpkgname=sbcl
pkgname=$_realpkgname-legacy
pkgver=2.2.5
pkgrel=1
pkgdesc="Steel Bank Common Lisp (legacy version)"
url='https://www.sbcl.org/'
arch=('i686' 'x86_64')
license=('Expat' 'Modified-BSD')
depends=('zlib')
provides=('common-lisp' 'cl-asdf')
makedepends=('clisp')
source=("https://downloads.sourceforge.net/project/sbcl/sbcl/$pkgver/$_realpkgname-$pkgver-source.tar.bz2"
        "fixes.lisp")
sha512sums=('9d581535348bb709ca1f7edbe5ad92f079fd1cbc9a462524220fb229bd78770f7855c0b1a8641b990a1d663fb559edc0c2ca0f029281d4b0c80a5917b45d7b72'
            '5a0eacd952d16f07060b89a4c73c17154446f8f9e1afb8ae026c8dff18f9de48bfef9a1cd9a2c3bf3176bd11d0a917e47e069964ca7a7b319c5f5d9999116a42')

build() {
  cd "$srcdir/$_realpkgname-$pkgver"
  export CFLAGS+=" -D_GNU_SOURCE -fno-omit-frame-pointer -DSBCL_HOME=/usr/lib/sbcl"
  export GNUMAKE="make"

  # build system uses LINKFLAGS and OS_LIBS to build LDFLAGS
  export LINKFLAGS="$LDFLAGS"
  unset LDFLAGS
  unset MAKEFLAGS
  sh make.sh clisp --prefix=/usr --fancy
  make -C doc/manual info
}

package() {
  cd "$srcdir/$_realpkgname-$pkgver"

  # cannot have both SBCL_HOME and INSTALL_ROOT
  SBCL_HOME="" INSTALL_ROOT="$pkgdir/usr" sh install.sh

  src/runtime/sbcl --core output/sbcl.core --script "${srcdir}/fixes.lisp"
  mv sbcl-new.core "${pkgdir}/usr/lib/sbcl/sbcl.core"

  # sources
  mkdir -p "$pkgdir/usr/share/sbcl-source"
  cp -R -t "$pkgdir/usr/share/sbcl-source" "$srcdir/$_realpkgname-$pkgver/"{src,contrib}

  # license
  install -D -m644 "$srcdir/$_realpkgname-$pkgver/COPYING" -t "$pkgdir/usr/share/licenses/$pkgname"

  # drop unwanted files
  find "$pkgdir" \( -name Makefile -o -name .cvsignore \) -delete
  find "$pkgdir/usr/share/sbcl-source" -type f \
    \( -name \*.fasl -o -name \*.o -o -name \*.log -o -name \*.so -o -name a.out \) -delete

  rm "$pkgdir/usr/share/sbcl-source/src/runtime/sbcl"
}

fixes.lisp

(in-package "COMMON-LISP-USER")

(let* ((parent (make-pathname :directory '(:absolute "usr" "share" "sbcl-source")))
       (src
    (merge-pathnames
     (make-pathname :directory '(:relative "src" :wild-inferiors)
            :name :wild :type :wild)
     parent))
         (contrib
          (merge-pathnames
           (make-pathname :directory '(:relative "contrib" :wild-inferiors)
                          :name :wild :type :wild)
           parent)))
  (setf (logical-pathname-translations "SYS")
    `(("SYS:SRC;**;*.*.*" ,src)
      ("SYS:CONTRIB;**;*.*.*" ,contrib))))

(ignore-errors
  (sb-ext:gc :full t)
  (sb-ext:enable-debugger)
  (sb-ext:save-lisp-and-die "sbcl-new.core"))
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

34

Re: [Collection] Compilation of packages and ports (not in repositories)

Package abbayedesmorts

PKGBUILD

# Maintainer: Tobias Dausend <throgh@hyperbola.info>

pkgname=abbayedesmorts
pkgver=2.0.4
pkgrel=1
pkgdesc="l'Abbaye des Morts - An obsolete, free and libre video game for a dark passage of history"
arch=('i686' 'x86_64')
url='https://github.com/nevat/abbayedesmorts-gpl'
license=('GPL-3' 'CC-BY-3.0')
depends=('sdl2' 'sdl2_image' 'sdl2_mixer')
groups=('games')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/nevat/abbayedesmorts-gpl/archive/refs/tags/v${pkgver}.tar.gz"
        "fhs-compliant.patch")
sha512sums=('46e2384c2f176dd54c3056d2e8a7ea1ea40da918bc1598414c68a2449f198e49c3dba30dc8c3c771f8d37e7a6eaa38caccbc2275d1712b7a8e5332ca400c5562'
            '0e57c75c0887f0016c1508d980099c55ab6ae1ef2fdb9a7e1359a6f4e1fd958ec6a116d77de4dcf8436f65c66bb4dec5813488691d41880c704aa584cb97f3e6')

prepare() {
  mv "${pkgname}-gpl-${pkgver}" "${pkgname}-${pkgver}"
  cd "${pkgname}-${pkgver}"
  patch -Np1 -i "$srcdir/fhs-compliant.patch"
}

build() {
  cd "${pkgname}-${pkgver}"
  make
}

package() {
  cd "${pkgname}-${pkgver}"
  mkdir -p "$pkgdir/usr/games"
  mkdir -p "$pkgdir/usr/share"
  mkdir -p "$pkgdir/usr/share/applications"
  mkdir -p "$pkgdir/usr/share/pixmaps"
  make DESTDIR="$pkgdir" install

  # license
  install -Dm644 {COPYING,ReadMe.md} -t "$pkgdir/usr/share/licenses/$pkgname"
}

fhs-compliant.patch

--- a/Makefile    2024-09-23 23:18:05.000000000 +0200
+++ b/Makefile    2024-12-15 02:36:43.892348396 +0100
@@ -23,7 +23,7 @@
 DATADIR= "\"./\""
 endif
 
-DATADIR?="\"$(PREFIX)/share/abbayev2\""
+DATADIR?="\"$(PREFIX)/share/games/abbayev2\""
 LDFLAGS?=    -Wl,-z,relro
 
 CFLAGS+=    `sdl2-config --cflags` -DDATADIR=$(DATADIR)
@@ -61,28 +61,28 @@
 
 # Installation
 install: $(PROG)
-    mkdir -p $(DESTDIR)$(PREFIX)/bin
-    cp $(PROG) $(DESTDIR)$(PREFIX)/bin
+    mkdir -p $(DESTDIR)$(PREFIX)/games
+    cp $(PROG) $(DESTDIR)$(PREFIX)/games
     mkdir -p $(DESTDIR)$(PREFIX)/share/applications
     cp abbaye.desktop $(DESTDIR)$(PREFIX)/share/applications
-    mkdir -p $(DESTDIR)$(PREFIX)/share/abbayev2/sounds
-    cp ./sounds/* $(DESTDIR)$(PREFIX)/share/abbayev2/sounds
-    mkdir -p $(DESTDIR)$(PREFIX)/share/abbayev2/data
-    cp ./data/* $(DESTDIR)$(PREFIX)/share/abbayev2/data
+    mkdir -p $(DESTDIR)$(PREFIX)/share/games/abbayev2/sounds
+    cp ./sounds/* $(DESTDIR)$(PREFIX)/share/games/abbayev2/sounds
+    mkdir -p $(DESTDIR)$(PREFIX)/share/games/abbayev2/data
+    cp ./data/* $(DESTDIR)$(PREFIX)/share/games/abbayev2/data
     mkdir -p $(DESTDIR)$(PREFIX)/share/pixmaps
     cp abbaye.png $(DESTDIR)$(PREFIX)/share/pixmaps
-    mkdir -p $(DESTDIR)$(PREFIX)/share/abbayev2/graphics
-    cp -r ./graphics/* $(DESTDIR)$(PREFIX)/share/abbayev2/graphics
+    mkdir -p $(DESTDIR)$(PREFIX)/share/games/abbayev2/graphics
+    cp -r ./graphics/* $(DESTDIR)$(PREFIX)/share/games/abbayev2/graphics
     mkdir -p $(DESTDIR)$(PREFIX)/share/appdata
     cp ./appdata/abbaye.appdata.xml $(DESTDIR)$(PREFIX)/share/appdata
 
 uninstall:
-    rm $(DESTDIR)$(PREFIX)/bin/$(PROG)
+    rm $(DESTDIR)$(PREFIX)/games/$(PROG)
     rm $(DESTDIR)$(PREFIX)/share/applications/abbaye.desktop
     rm $(DESTDIR)$(PREFIX)/share/pixmaps/abbaye.png
-    rm -rf $(DESTDIR)$(PREFIX)/share/abbayev2
+    rm -rf $(DESTDIR)$(PREFIX)/share/games/abbayev2
     rm $(DESTDIR)$(PREFIX)/share/appdata/abbaye.appdata.xml
     # ignore if not empty
-    -rmdir $(DESTDIR)$(PREFIX)/bin
+    -rmdir $(DESTDIR)$(PREFIX)/games
     -rmdir $(DESTDIR)$(PREFIX)/share/applications
     -rmdir $(DESTDIR)$(PREFIX)/share/pixmaps
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

35

Re: [Collection] Compilation of packages and ports (not in repositories)

Package sar (Search and Rescue)

PKGBUILD

# Maintainer: Tobias Dausend <throgh@hyperbola.info>

pkgname=sar
_pkgbase=SearchAndRescue
_pkgname=searchandrescue
pkgver=1.5.0
_debver=$pkgver
_debrel=2.1
pkgdataver=1.3.0
pkgrel=1
pkgdesc="Fly aircraft to search (for) and rescue people in distress"
url='http://sourceforge.net/projects/searchandrescue/'
license=('GPL-2')
arch=('i686' 'x86_64')
depends=('glibc' 'glu' 'sdl' 'sdl_mixer' 'libx11' 'libxpm' 'libxxf86vm' 'libxext' 'libxmu')
makedepends=('clang')
groups=('games')
source=("https://deb.debian.org/debian/pool/main/s/searchandrescue/searchandrescue_${pkgver}.orig.tar.gz"
        "https://deb.debian.org/debian/pool/main/s/searchandrescue/searchandrescue_${_debver}-${_debrel}.diff.gz"
        "https://deb.debian.org/debian/pool/main/s/searchandrescue-data/searchandrescue-data_${pkgdataver}.orig.tar.gz")
sha512sums=('72a8e5c375bb2f5d11d1346bb3c81ea4678a9c58c36f53c048e9a16d32a926ff93c3ec9756867f0869aa2a8da5fb0bfe7764f704c4e79519ee0834d225513657'
            '7e3d76e54684f0a8f761dbbbc426a3bf68802d9a546864ef8c306b542b757976e9e73d0a9da70fba6c55a6c83d90c89b801815bd251f0462c7a463de061752cb'
            '5419376aeecb0f05570a8d2a0a6f830f3b22ce9d1d34a5e490485767546c6d0d1d2a2a3f37e5dfcef69e271a94a9c7dfc6b592e3c0dd62a8a6c38e4bf7d25ccd')
noextract=("searchandrescue-data_${pkgdataver}.orig.tar.gz")

prepare() {
  cd ${_pkgname}_${pkgver}
  patch -Np1 < ${srcdir}/${_pkgname}_${_debver}-${_debrel}.diff
}

build() {
  cd ${_pkgname}_${pkgver}
  make
}

package() {
  cd ${_pkgname}_${pkgver}
  make DESTDIR="$pkgdir/" install

  # install data-files
  install -d "${pkgdir}/usr/share/games/$_pkgname"
  tar -xzf "${srcdir}/searchandrescue-data_${pkgdataver}.orig.tar.gz" \
      -C   "${pkgdir}/usr/share/games/$_pkgname/"

  # install metadata-files
  install -Dm644 debian/$_pkgbase.desktop "${pkgdir}/usr/share/applications/"$_pkgbase.desktop

  # install license
  install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/$pkgname/"
}
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

36

Re: [Collection] Compilation of packages and ports (not in repositories)

Package sar2 (Search and Rescue 2)

PKGBUILD

# Maintainer (Arch): Popolon <popolon@popolon.org>
# Maintainer: Tobias Dausend <throgh@hyperbola.info>

_name=SearchAndRescue2
pkgname=sar2
pkgver=2.5.0
pkgrel=2
pkgdesc="Free and libre helicopter simulator"
url='https://searchandrescue2.github.io/sar2/'
license=('GPL-2')
arch=('i686' 'x86_64')
depends=('freealut' 'openal' 'libvorbis' 'sdl2' 'libsm' 'libxmu' 'libxpm' 'glu')
makedepends=('scons' 'python-setuptools')
groups=('games')
source=("https://github.com/$_name/$pkgname/archive/v$pkgver.tar.gz"
        "fhs-compliant.patch")
sha512sums=('b5e6036e9ca0bce4245b951cdc16e676470f95906c714b28facf0006c4db838d86dbb57982712fa5f6abb9bd774c61b9d1c593c82b08325e9f28db25273a194a'
            '754ced777865fbd2eb4102eb79eeb8ebb6ffad3e4a0ff81c9cdf29a089d33adf779c146aaa8b25c914e6034fc52545f7d760e7e51a385b142a54f1893d2373b6')

prepare() {
  cd "$pkgname-$pkgver"
  patch -Np1 -i ${srcdir}/fhs-compliant.patch
}

build() {
  cd "$pkgname-$pkgver"
  scons
}

package() {
  cd "$pkgname-$pkgver"
  scons install --prefix=${pkgdir}/usr
  install -Dm644 extra/$pkgname.desktop "${pkgdir}/usr/share/applications/$pkgname.desktop"
  install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/$pkgname"
}

fhs-compliant.patch

--- a/src/SConscript    2020-06-20 23:48:35.000000000 +0200
+++ b/src/SConscript    2021-10-24 17:56:07.030471759 +0200
@@ -177,11 +177,11 @@
 """)
 
 object_list = env.Object(source = sources)
-sar2 = env.Program(target='#bin/sar2', source=[object_list])
+sar2 = env.Program(target='#games/sar2', source=[object_list])
 data='#data'
 man='#man/sar2.6.bz2'
 pixmap='#extra/sar2.xpm'
-env.Alias("install", env.InstallAs('$DESTDIR/$PREFIX/share/sar2', data))
+env.Alias("install", env.InstallAs('$DESTDIR/$PREFIX/share/games/sar2', data))
 env.Alias("install", env.Install('$DESTDIR/$PREFIX/share/man/man6', man))
 env.Alias("install", env.Install('$DESTDIR/$PREFIX/share/pixmaps', pixmap))
-env.Alias("install", env.Install('$DESTDIR/$PREFIX/bin', sar2))
+env.Alias("install", env.Install('$DESTDIR/$PREFIX/games', sar2))
--- a/src/config.h    2020-06-20 23:48:35.000000000 +0200
+++ b/src/config.h    2021-10-24 18:06:58.489853438 +0200
@@ -502,7 +502,7 @@
 #define SAR_DEF_LOCAL_DATA_DIR  ".config/sar2"
 
 /* Game data dir */
-#define SAR_DEF_GLOBAL_DATA_DIR "/usr/share/sar2"
+#define SAR_DEF_GLOBAL_DATA_DIR "/usr/share/games/sar2"
 
 /* Subdirs, one of each in the local and global game dirs */
 #define SAR_DEF_AIRCRAFTS_DIR        "aircrafts"
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

37

Re: [Collection] Compilation of packages and ports (not in repositories)

Package enlightenment16

PKGBUILD

# Maintainer (Arch): Brian BIdulock <bidulock@openss7.org>
# Contributor (Arch): Eric Bélanger <eric@archlinux.org>
# Maintainer: André Silva <emulatorman@hyperbola.info>
# Contributor: Tobias Dausend <throgh@hyperbola.info>

pkgname=enlightenment16
pkgver=1.0.29
_themever=1.0.3
pkgrel=1
pkgdesc="A fast, flexible, and very extensible Window Manager"
arch=('i686' 'x86_64')
url='https://www.enlightenment.org/e16'
license=('Expat')
depends=('libxinerama' 'imlib2' 'perl' 'pango' 'libxcomposite' 'sndio' 'libxrandr' 'libxdamage' 'libsndfile')
makedepends=('libsndio')
source=("https://downloads.sourceforge.net/sourceforge/enlightenment/e16-${pkgver}.tar.gz"
        "https://downloads.sourceforge.net/enlightenment/e16-themes-${_themever}.tar.gz"
        "starte16")
sha512sums=('e95dc2ad05b4f2ec3f374c5268f8f790e9ddd212f4e5e60d3517ade8645e539de5207553a841e14d1c099496f8385271f3f95867ef8ebfd99c419201477ef299'
            '6c8d7d15233f401c9b6c406116d822c42b7eed9b81570f2f25824886eee0a8c51895dfeeffa5c6e820f5e9449d9d28ec55e029f1136b5cb55cd7072fe9f57cba'
            '99f382ddcb0951f38e3bff686cf4e2940e408729490719108e671c4bae7aae3708f8c6222b392ebf31bef21b788f8de7bdd894402b3e060dc0c9f716f78b0c22')

build() {
  pushd e16-${pkgver}
  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --enable-sound=sndio \
    --enable-dbus=no \
    --with-gnome=no
  make
  popd
  
  cd e16-themes-${_themever}
  ./configure --prefix=/usr
}

package() {
  cd e16-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -D -m644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -D -m644 fonts/COPYRIGHT.Vera -t "${pkgdir}/usr/share/licenses/${pkgname}"

  cd "${srcdir}/e16-themes-${_themever}"
  make DESTDIR="${pkgdir}" install
  chown -R root:root "${pkgdir}"/usr/share/*

  # removing unsupported
  rm "${pkgdir}"/usr/share/e16/misc/e16-dbus-cmd
  rm "${pkgdir}"/usr/share/e16/misc/starte16-gnome
  rm "${pkgdir}"/usr/share/e16/misc/starte16-kde
  rm "${pkgdir}"/usr/share/e16/misc/Xclients.e16-gnome.sh
  rm "${pkgdir}"/usr/share/e16/misc/Xclients.e16-kde.sh
  rm "${pkgdir}"/usr/share/xsessions/e16-kde-session.desktop

  # attach script
  rm "${pkgdir}"/usr/share/e16/misc/starte16
  cp "${srcdir}"/starte16  "${pkgdir}"/usr/share/e16/misc/
}

starte16

#!/bin/sh

s=$1
test -z "$s" && s=$0

case "$s" in
*window)
    exec /usr/bin/e16 -w ${SIZE:-800x600}
    ;;
*)
    exec /usr/bin/e16
    ;;
esac
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

38

Re: [Collection] Compilation of packages and ports (not in repositories)

Package pekwm

PKGBUILD

# Maintainer (Arch): Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor (Arch): Kevin Piche <kevin@archlinux.org>
# Contributor (Arch): Eddie Lozon <almostlucky@attbi.com>
# Maintainer: Tobias Dausend <throgh@hyperbola.info>

pkgname=pekwm
pkgver=0.1.18
_debver=$pkgver
_debrel=1
pkgrel=1
pkgdesc="Tabbed X11 window manager"
arch=('i686' 'x86_64')
license=('GPL-2')
url='https://github.com/pekdon/pekwm'
depends=('libjpeg-turbo' 'libxft' 'libxinerama' 'libxpm' 'libxrandr')
makedepends=('quilt')
optdepends=('lxappearance: feature-rich GTK+ theme switcher'
            'nitrogen: background browser and setter'
            'tint2: basic, good-looking task manager')
backup=('etc/pekwm/autoproperties'
        'etc/pekwm/autoproperties_typerules'
        'etc/pekwm/config'
        'etc/pekwm/config_system'
        'etc/pekwm/keys'
        'etc/pekwm/menu'
        'etc/pekwm/mouse'
        'etc/pekwm/mouse_click'
        'etc/pekwm/mouse_sloppy'
        'etc/pekwm/mouse_system'
        'etc/pekwm/start'
        'etc/pekwm/vars')
source=("https://github.com/${pkgname}/${pkgname}/releases/download/release-${pkgver}/${pkgname}-${pkgver}.tar.gz"
        "https://deb.debian.org/debian/pool/main/p/pekwm/pekwm_${_debver}-${_debrel}.debian.tar.xz")
sha512sums=('7fe04c04089d3375d1f64d456a7a582e88fd1f442c1c710bdef71309c7fe5aab234026ba381eb9a49b3d459b759924b577ba9597156e46e60147a9d845c27e89'
            '7f8d285b2725ee24b5fcefc1bacbb9b9738f58c19b49bafe40645e72f71f9ca1498a55185184f22906cbdfa404c626b8e7abc33406549af0b85ba8d36f78c615')

prepare() {
  cd $pkgname-$pkgver
  if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
    # Debian patches
    export QUILT_PATCHES=debian/patches
    export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
    export QUILT_DIFF_ARGS='--no-timestamps'

    mv "$srcdir"/debian .

    quilt push -av
  fi
  ./autogen.sh
}

build() {
  cd $pkgname-$pkgver
  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc
  make
}

package() {
  make -C $pkgname-$pkgver DESTDIR="$pkgdir" install
  install -Dm644 "$srcdir"/$pkgname-$pkgver/debian/$pkgname.desktop "$pkgdir"/usr/share/xsessions/$pkgname.desktop
  install -Dm644 "$srcdir"/$pkgname-$pkgver/LICENSE -t "${pkgdir}/usr/share/licenses/$pkgname"
}
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

39

Re: [Collection] Compilation of packages and ports (not in repositories)

Package pekwm-themes

PKGBUILD

# Maintainer (Arch): Alexander F Rødseth <xyproto@archlinux.org>
# Maintainer: Tobias Dausend <throgh@hyperbola.info>

pkgname=pekwm-themes
pkgver=1.0.5
_debver=$pkgver
_debrel=7
pkgrel=1
pkgdesc="PekWM theme collection"
arch=('any')
license=('GPL-2' 'GPL-3')
depends=('pekwm')
source=("${pkgname}-${pkgver}.tar.gz::https://deb.debian.org/debian/pool/main/p/pekwm-themes/pekwm-themes_${pkgver}.orig.tar.gz"
        "https://deb.debian.org/debian/pool/main/p/pekwm-themes/pekwm-themes_${_debver}-${_debrel}.debian.tar.xz")
sha512sums=('94ef6e1cb564fcc28601729e1a6e95c6f858ab7a31ea9bf3ad8478398931229ee0087ec3724c4df263b45191064503dae91bee7e8abeeeca10ca783601ad2fe3'
            '310df602fa223650cde9a7cbf6f8f46619d5ae4ef9ae241552ac629c9a619eb3b17b80e2109a6baf4c4638a65c7aa8e8916c5523e439f91f8d39aea1cbef0555')

package() {
  install -d "$pkgdir/usr/share/pekwm/themes"
  cp -R "$srcdir/$pkgname/"* "$pkgdir/usr/share/pekwm/themes/"
  install -Dm644 "$srcdir/debian/copyright" -t "$pkgdir/usr/share/licenses/$pkgname"
}
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

40

Re: [Collection] Compilation of packages and ports (not in repositories)

Package fricas

PKGBUILD

# Maintainer (Arch): Antonio Rojas <arojas@archlinux.org>
# Contributor (Arch): Sergey Khorev <sergey.khorev@gmail.com>
# Maintainer: Tobias Dausend <throgh@hyperbola.info>

pkgname=fricas
pkgver=1.3.8
_debver=$pkgver
_debrel=6
pkgrel=1
pkgdesc="An advanced computer algebra system"
arch=('i686' 'x86_64')
url='https://fricas.github.io'
license=('Modified-BSD')
depends=('gawk' 'glibc' 'libx11' 'libxpm' 'sh')
makedepends=('sbcl-legacy' 'quilt')
options=(!strip)
source=("$pkgname-$pkgver.tar.bz2::https://deb.debian.org/debian/pool/main/f/fricas/fricas_$pkgver.orig.tar.bz2"
        "https://deb.debian.org/debian/pool/main/f/fricas/fricas_$_debver-$_debrel.debian.tar.xz")
sha512sums=('330554f9dc36b47451195e3dee88fe26a80ab2bf9b6750d651cd53c5ba16b9c9736176936c7c69e699685be25aa62b6a099ed7340913e946a4f5e53579835dbb'
            '6f34cb205fb13f7018a5c1bf4d278f1fe331e5de41f713180cb953a36bf75455fc55308c3a39d2e4104f4d8f167dcdff8f7012b6d13f22abe3511013161d58c8')

prepare() {
  cd $pkgname-$pkgver
  if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
    # Debian patches
    export QUILT_PATCHES=debian/patches
    export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
    export QUILT_DIFF_ARGS='--no-timestamps'

    mv "$srcdir"/debian .

    # Doesn't apply
    rm -v debian/patches/package-names-and-ansi-pathname || true

    quilt push -av
  fi
}

build() {
  cd $pkgname-$pkgver
  ./configure \
    --prefix=/usr \
    --with-lisp='sbcl \
    --control-stack-size 512 \
    --dynamic-space-size 6000'
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  install -Dm644 license/LICENSE.AXIOM -t "$pkgdir"/usr/share/licenses/$pkgname
}
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

41

Re: [Collection] Compilation of packages and ports (not in repositories)

Package cdrip-tools

PKGBUILD

# Maintainer (Arch): John Lane <archlinux at jelmail dot com>
# Maintainer: Tobias Dausend <throgh@hyperbolainfo>

pkgname=cdrip-tools
pkgver=0.3
pkgrel=1
pkgdesc="Commandline accuraterip verifier and rip offset fixer"
url='https://github.com/spadev/cdrip-tools'
arch=('i686' 'x86_64')
license=('GPL-3')
depends=('python' 'libsndfile')
source=("${pkgname}-${pkgver}.zip::https://github.com/spadev/${pkgname}/archive/master.zip")
sha512sums=('43493a2f7b0f8cd0fc9f3de82cc3d1f0bb81b770e468ba7bf3259c89cbd7de3d1ba1295d1f628cf3dc7d65ab8fbc4cca7d73b85309932dd81eb0369d9137c20a')

prepare() {
  mv "$pkgname-master" "$pkgname-$pkgver"
}

build() {
  cd $srcdir/$pkgname-$pkgver
  cc -o ckcdda ckcdda.c
  cc -o splitaudio -l sndfile splitaudio.c

  # nasty library hack - change name to something less generic
  sed -i -e 's/^import utils/import cdrip_utils as utils/' \
         -e 's/^from utils/from cdrip_utils/' *.py
}

package() {
  cd $srcdir/$pkgname-$pkgver
  install -Dm644 README.md $pkgdir/usr/share/doc/$pkgname/README.md
  install -Dm755 arverify.py $pkgdir/usr/bin/arverify
  install -Dm755 fixoffset.py $pkgdir/usr/bin/fixoffset
  install -Dm755 splitaudio $pkgdir/usr/bin/
  install -Dm755 ckcdda $pkgdir/usr/bin/

  # nasty library hack - install renamed library (hopefully in site-packages!)
  pylibdir=$(python -c "import sys; print(sys.path[-1]);")
  install -Dm755 utils.py $pkgdir${pylibdir}/cdrip_utils.py

  install -Dm644 LICENSE -t $pkgdir/usr/share/licenses/$pkgname
}
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

42

Re: [Collection] Compilation of packages and ports (not in repositories)

Package rmw

PKGBUILD

# Maintainer (Arch): Andy Alt <arch_stanton5995 at proton.me>
# Contributor (Arch): Oliver Jaksch <arch-aur at com-in dot de>
# Maintainer: Tobias Dausend <throgh@hyperbola.info>

pkgname=rmw
pkgver=0.8.0
pkgrel=1
pkgdesc="Trash/recycle bin utility for the commandline"
arch=('i686' 'x86_64')
url='https://theimpossibleastronaut.com/rmw-website/'
license=('GPL-3')
depends=('glibc' 'ncurses')
makedepends=('meson' 'ninja')
source=("https://github.com/theimpossibleastronaut/rmw/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha512sums=('5744e4b46edecfd6d0588d9b0ecbc8a91e8495f2e07d87599d045f620a2ae08381e9efa97cfa51c83cfcf8a2e89a594f8e87c374dc452ffb5b1bd2371b46aa22')

build() {
  hyperbola-meson $pkgname-$pkgver build -Db_sanitize=none
  meson compile -v -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
  rm -rf "$pkgdir/usr/share/doc/$pkgname/external"
  install -Dm644 "$srcdir/$pkgname-$pkgver/COPYING" -t "$pkgdir/usr/share/licenses/$pkgname"
}
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

43

Re: [Collection] Compilation of packages and ports (not in repositories)

Package scappit

PKGBUILD

# Maintainer (Arch): Oliver Giles <web ohwg net>
# Maintainer: Tobias Dausend <throgh@hyperbola.info>

pkgname=scappit
pkgver=0.3
pkgrel=1
pkgdesc="Simple screen capture and annotation"
arch=('i686' 'x86_64')
url='https://scappit.ohwg.net'
license=('Expat')
depends=('qt-base' 'qt-x11extras' 'gnome-icon-theme')
makedepends=('cmake')
options=('strip')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/ohwgiles/$pkgname/archive/v${pkgver}.tar.gz"
        "${pkgname}.desktop")
sha512sums=('66eac8dbd1f259ac92403029cd3558605d00f61c57846cce547ece503a9e9f691d98dafa50eab256448b762ac763c78886e0fa1ad6de331521de390f811994cf'
            '41364792a000f6065c85c60422a5c68c56951063be11a2d65ce25a7e38469b1c8e165e0de1fb766e978a6af124a9fd272c39e7303731bdecb3046be53e639ed1')

build() {
  cmake \
    -S $pkgname-$pkgver \
    -B build \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release \
    -Wno-dev
  make -C build
}

package() {
  make DESTDIR="$pkgdir/" -C build install/strip
  install -Dm644 "$srcdir/$pkgname.desktop" -t "$pkgdir/usr/share/applications"
  install -Dm644 "$srcdir/$pkgname-$pkgver/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname"
}

scappit.desktop

[Desktop Entry]
Version=1.0
Name=Scappit
GenericName=Simple screen capture and annotation
Comment=Simple screen capture and annotation
Type=Application
Categories=Graphics;GTK;
Exec=scappit
TryExec=scappit
Terminal=false
StartupNotify=true
Icon=applets-screenshooter
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

44

Re: [Collection] Compilation of packages and ports (not in repositories)

Package sdl3

PKGBUILD

# Maintainer (Arch): Sven-Hendrik Haase <svenstaro@archlinux.org>
# Maintainer: Tobias Dausend <throgh@hyperbola.info>

pkgname=sdl3
pkgver=3.2.14
pkgrel=1
pkgdesc="A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard (Version 3)"
arch=('i686' 'x86_64')
url="https://www.libsdl.org"
license=('zlib')
depends=('glibc' 'libxext' 'libxrender' 'libx11' 'mesa-libgl' 'libxcursor' 'libusb')
makedepends=('cmake' 'ninja' 'jack' 'alsa-lib' 'mesa' 'libxrandr' 'libxinerama' 'libxkbcommon'
             'libxss' 'sndio')
optdepends=(
  'alsa-lib: ALSA audio driver'
  'sndio: sndio audio driver'
)
source=("https://github.com/libsdl-org/SDL/releases/download/release-${pkgver}/SDL3-${pkgver}.tar.gz")
sha512sums=('7e501bda73cc7b42b860e6ba6f9a0450fdb5014f5999afa64ccd6b4eb633edf6646fd1e251d58189649755a883d7dd51e5bcc53e841974180ed73d56fb8e29cd')

build() {
  CFLAGS+=" -ffat-lto-objects"
  cmake -S SDL3-${pkgver} \
    -B build -G Ninja \
    -D CMAKE_BUILD_TYPE=None \
    -D CMAKE_INSTALL_PREFIX=/usr \
    -D SDL_STATIC=OFF \
    -D SDL_RPATH=OFF
  cmake --build build
}

package() {
  DESTDIR="${pkgdir}" cmake --install build
  install -Dm644 SDL3-${pkgver}/LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

45

Re: [Collection] Compilation of packages and ports (not in repositories)

Package dustrac

PKGBUILD

# Maintainer (Arch): Frederic Bezies <fredbezies at gmail dot com>
# Contributor (Arch): Daniel Milde
# Maintainer: Jayvee Enaguas <harvettfox96@dismail.de>
# Contributor: Tobias Dausend <throgh@hyperbola.info>

pkgname=dustrac
_pkgname=DustRacing2D
pkgver=2.1.1
pkgrel=2
_debver=2.1.1
_debrel=1
pkgdesc='Dust Racing 2D is a traditional top-down car racing game including a level editor'
arch=('x86_64' 'i686')
url='https://juzzlin.github.io/DustRacing2D/'
license=('GPL-3' 'CC-BY-SA-3.0')
depends=('qt-tools' 'openal' 'libvorbis' 'glu')
makedepends=('cmake' 'quilt')
groups=('games')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/juzzlin/${_pkgname}/archive/${pkgver}.tar.gz"
    "https://deb.debian.org/debian/pool/main/d/${pkgname}/${pkgname}_${_debver}-${_debrel}.debian.tar.xz")
sha512sums=('9a49cd0302ab47b12ee587a33cc74c1df2bf6cf7925141cbf957fc90a5c1a34423d4420be28bcb6909a862daa12d6214b397fd0fc77e9e18fa649f3ca5c2e1ab'
        '8824ae4dd0d281d945521262eb0a88927539ee335f475f3f42b5876bece2af32eaa1e4651b0be40d07cfd282a851c4a508229c90c23e02b40e5d3a7377399f57')

prepare() {
  cd ${_pkgname}-${pkgver}/

  if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
    # Debian patches
    export QUILT_PATCHES=debian/patches
    export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
    export QUILT_DIFF_ARGS='--no-timestamps'

    mv "$srcdir"/debian/ ./

    quilt push -av
  fi
}

build() {
  cd ${_pkgname}-${pkgver}/

  mkdir build && cd build
  cmake ../ \
    -DReleaseBuild=ON \
    -DCMAKE_INSTALL_PREFIX=/usr/ \
    -DBIN_PATH=games
  make
}

package() {
  cd ${_pkgname}-${pkgver}/build/

  make DESTDIR=${pkgdir} install
  # Install licence file.
  install -Dm644 ../COPYING -t ${pkgdir}/usr/share/licenses/${pkgname}/
}
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

46

Re: [Collection] Compilation of packages and ports (not in repositories)

Package heroes

PKGBUILD

# Maintainer (Arch): Steve Engledow <steve@offend.me.uk>
# Maintainer: Tobias Dausend <throgh@hyperbola.info>

pkgname=heroes
pkgver=0.21
_debver=$pkgver
_debrel=18
pkgrel=2
pkgdesc="An arena fighting game."
url='https://heroes.sourceforge.net'
arch=('i686' 'x86_64')
license=('GPL-2')
depends=('sdl' 'sdl_mixer')
makedepends=('quilt')
groups=('games')
source=("https://downloads.sourceforge.net/heroes/$pkgname-$pkgver.tar.gz"
        "https://downloads.sourceforge.net/heroes/$pkgname-data-1.5.tar.gz"
        "https://downloads.sourceforge.net/heroes/$pkgname-sound-tracks-1.0.tar.gz"
        "https://downloads.sourceforge.net/heroes/$pkgname-sound-effects-1.0.tar.gz"
        "https://downloads.sourceforge.net/heroes/$pkgname-hq-sound-tracks-1.0.tar.gz"
        "https://deb.debian.org/debian/pool/main/h/heroes/heroes_$_debver-$_debrel.debian.tar.xz")
sha512sums=('8a28f7c0af8f194fd3557293dd65d555f4cf40e236f776ed1ef7b75f032fa511bae750d9312ba62d183129f8a529c515178ecd40f719c85583c519d531191d30'
            'ec001cda314b43b4e98f784e86bfd29da1cbac75ae981cf9ba738de0e366b47a112a21f0382a8c02737968d295f292e42451250ff9fdaee068662d0f221821f1'
            'eefa299a12b9d0a72eb73b978eab3cce5a6bcafb28acf52981762b64b7d74b7128c8a7e8517b6dcbb5281be0481c4d2fdd01de8706aefe08263ba5de4f29efae'
            '7ac2d0353122839a1b3266c6bb91c8279beade9d41f87031e4116c0a27fc7979d7a8d64fe1eab77b39a4da5869179f0ce7b8a137134df70159d745b7a63156cf'
            '565229fb00ac06d1a3ea37335138ffe87564317eab4d96b069ecd70e276f92141d9c746bc0b2d2f0abdd47e60ca580e063a2cb265d068624b4f306ce9c37f7fc'
            'c558bf06f76e5e9c74f86d14ec36d351395b2b69de7eb5c4c3bc3e18e3911585f9eca7a0f46e6b6076dafe4abca972302eeb6f4173853bd5e946eb0785eea98e')

prepare() {
  cd "$pkgname-$pkgver"
  if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
    # Debian patches
    export QUILT_PATCHES=debian/patches
    export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
    export QUILT_DIFF_ARGS='--no-timestamps'

    mv "$srcdir"/debian .

    quilt push -av
  fi
}

build() {
  cd "$pkgname-$pkgver"
  LDFLAGS=-lm ./configure \
    --prefix=/usr \
    --bin=/usr/games \
    --datadir=/usr/share/games
  make

  cd "$srcdir/$pkgname-data-1.5"
  ./configure \
    --prefix=/usr \
    --datadir=/usr/share/games
  make

  cd "$srcdir/$pkgname-sound-tracks-1.0"
  ./configure \
    --prefix=/usr \
    --datadir=/usr/share/games
  make

  cd "$srcdir/$pkgname-sound-effects-1.0"
  ./configure \
    --prefix=/usr \
    --datadir=/usr/share/games
  make

  cd "$srcdir/$pkgname-hq-sound-tracks-1.0"
  ./configure \
    --prefix=/usr \
    --datadir=/usr/share/games
  make
}

package() {
  cd "$pkgname-$pkgver"
  make DESTDIR="$pkgdir/" install
  mv "$pkgdir/"usr/share/games/locale "$pkgdir/"usr/share
  install -Dm644 debian/$pkgname.desktop "$pkgdir"/usr/share/applications/$pkgname.desktop
  install -Dm644 debian/$pkgname.xpm "$pkgdir"/usr/share/pixmaps/$pkgname.xpm
  install -Dm644 COPYING -t "$pkgdir/usr/share/licenses/$pkgname"

  cd "$srcdir/$pkgname-data-1.5"
  make DESTDIR="$pkgdir/" install

  cd "$srcdir/$pkgname-sound-tracks-1.0"
  make DESTDIR="$pkgdir/" install

  cd "$srcdir/$pkgname-sound-effects-1.0"
  make DESTDIR="$pkgdir/" install

  cd "$srcdir/$pkgname-hq-sound-tracks-1.0"
  make DESTDIR="$pkgdir/" install
}
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

47

Re: [Collection] Compilation of packages and ports (not in repositories)

Package crimson-fields

PKGBUILD

# Maintainer (Arch): Winston Weinert <winston@ml1.net>
# Maintainer: Tobias Dausend <throgh@hyperbola.info>

pkgname=crimson-fields
_pkgname=crimson
pkgver=0.5.3
pkgrel=1
pkgdesc="Free and libre turn-based tactical game with a hex grid and multiplayer support"
arch=('i686' 'x86_64')
url='http://crimson.seul.org'
license=('GPL-2')
depends=('sdl' 'sdl_ttf' 'sdl_mixer' 'sdl_net')
groups=('games')
source=("http://crimson.seul.org/files/$_pkgname-$pkgver.tar.gz")
sha512sums=('56a0c8c3e271f6ca53baaee23c28b594033b2d3e4b22fb4cd58c9858dc2bda556a13d1204cdba607da0a4414affb455b1403dde73e385a1accdd5162ec9e0a89')

build() {
  cd "$srcdir/$_pkgname-$pkgver"

  ./configure \
    --prefix=/usr \
    --bindir=/usr/games \
    --datarootdir=/usr/share/games
  make
}

package() {
  cd "$srcdir/$_pkgname-$pkgver"

  make DESTDIR="$pkgdir/" install
  mv "$pkgdir"/usr/share/games/{applications,man,pixmaps} "$pkgdir"/usr/share
  install -Dm644 COPYING -t "$pkgdir"/usr/share/licenses/$pkgname
}
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!