diff options
author | Marcell Meszaros | 2024-03-26 16:28:39 +0100 |
---|---|---|
committer | Marcell Meszaros | 2024-03-26 19:18:05 +0100 |
commit | 9ad2b7aa5b0d4d0c149d0ffd7e11d1d5f7317637 (patch) | |
tree | 0ddcfa4f7e7bea081cae7dc841a9bb0d1c5a4957 | |
parent | 592c17f54c80c9e6d280cba42c12bcaec12071bc (diff) | |
download | aur-londonlaw-git.tar.gz |
0.3.0_pre2.r49 pkgrel-0.1 @horel's Py3 fork, cajonKA's patch, WiP setup.py (TODO add images, fix modulepaths)
-rw-r--r-- | .CHANGELOG | 37 | ||||
-rw-r--r-- | .SRCINFO | 53 | ||||
-rw-r--r-- | .gitignore | 18 | ||||
-rw-r--r-- | 128px_icon.png | bin | 0 -> 43401 bytes | |||
-rw-r--r-- | 16px_icon.png | bin | 0 -> 887 bytes | |||
-rw-r--r-- | 20px_icon.png | bin | 0 -> 1256 bytes | |||
-rw-r--r-- | 24px_icon.png | bin | 0 -> 1735 bytes | |||
-rw-r--r-- | 256px_icon.png | bin | 0 -> 163508 bytes | |||
-rw-r--r-- | 32px_icon.png | bin | 0 -> 2901 bytes | |||
-rw-r--r-- | 36px_icon.png | bin | 0 -> 3616 bytes | |||
-rw-r--r-- | 44px_icon.png | bin | 0 -> 5300 bytes | |||
-rw-r--r-- | 48px_icon.png | bin | 0 -> 6287 bytes | |||
-rw-r--r-- | 64px_icon.png | bin | 0 -> 10987 bytes | |||
-rw-r--r-- | 96px_icon.png | bin | 0 -> 24583 bytes | |||
-rw-r--r-- | PKGBUILD | 120 | ||||
-rw-r--r-- | londonlaw-setup.py | 151 |
16 files changed, 299 insertions, 80 deletions
diff --git a/.CHANGELOG b/.CHANGELOG deleted file mode 100644 index 9441ccd5242f..000000000000 --- a/.CHANGELOG +++ /dev/null @@ -1,37 +0,0 @@ -London Law ChangeLog --------------------------------------------------------------------------------- - -0.2 - - 2005-02-15 Announce 0.2.0rc1. - - Tooltip username labels for the map window are now more - visible on OS X. - - Most wxStaticTextBox instances have been replaced with - simple labels. - - 2005-02-14 Server will permit clients to disconnect during gameplay - and then rejoin the game. Server saves game data to a - database, so it can be shut down and restarted without - loss of game state. - - Clients receive pop-up notification when a player leaves, - rejoins, etc. - - Clients can send chat messages "to all" or "to team". - - 2005-02-12 Completed rewrite of all networking code, using the - event-driven Twisted framework. Protocol is now line-based. - Server supports multiple simultaneous games. Thanks to - Conor Davis <conor at fastmail dot fm> for significant - contributions to server code. - - Client game registration windows now use the more - suitable wxListCtrl. - - -0.1 - - 2004-11-13 Release 0.1.0. - @@ -1,23 +1,50 @@ pkgbase = londonlaw-git pkgdesc = Clone of the famous Scotland Yard board game with network support. - pkgver = 0.3.0_pre2.r1.g35d419f - pkgrel = 4 - url = https://github.com/anyc/londonlaw - changelog = .CHANGELOG + pkgver = 0.3.0_pre2.r49.g832397b + pkgrel = 0.1 + url = https://github.com/horald/londonlaw arch = any - license = GPL2 + license = GPL-2.0-only makedepends = git - makedepends = python2-twisted - makedepends = wxpython - makedepends = python2-zope-interface - depends = python2 + makedepends = python-build + makedepends = python-installer + makedepends = python-setuptools + makedepends = python-wheel depends = hicolor-icon-theme + depends = python + depends = python-twisted + depends = python-wxpython provides = londonlaw conflicts = londonlaw - source = londonlaw::git+https://github.com/anyc/londonlaw.git + source = londonlaw::git+https://github.com/horald/londonlaw.git + source = 128px_icon.png + source = 16px_icon.png + source = 20px_icon.png + source = 24px_icon.png + source = 256px_icon.png + source = 32px_icon.png + source = 36px_icon.png + source = 44px_icon.png + source = 48px_icon.png + source = 64px_icon.png + source = 96px_icon.png source = londonlaw.desktop - sha512sums = SKIP - sha512sums = 15f537cdca41dd72a37574151fba5df9cf70b02f849e72c3ffab65453ab69562209c7053454e9c065bbb657cf6c4fd982ef27edb124a6be91c690dfdfec8e9da + source = londonlaw-patch-cajonKA-1-a8d7908.patch::https://github.com/cajonKA/londonlaw/commit/a8d79083be6a9cac899da82ad64c2e3a37fcdc8e.patch + source = londonlaw-setup.py + b2sums = SKIP + b2sums = b5d923db2b0af49552e5d7f0e0bb554fb9a7614424228edbdc0ccbd91110faa791a646982b91391ad742c8cb6d4ae75db7c61b44215ba8589c003f1524f829d2 + b2sums = 27121f1258ba15cc0ec62025932b57650c6949c2789d18ac544d4199f49621cc6c1c9c211dbbc6b3d015766c79ad2f3708f19b9dadf4e804cb4bce48808370e3 + b2sums = c8afadce0249fb9b9a98facf293a0502ca4435ea3b37781d3cec01a422bc5bfd9716861fd2a8f74777f45b2328d65918faf19d2a93553984490856ef0c4a4ff8 + b2sums = 4894b5356b8b06f02fa91c1bc99ec4c4b37590cef078774aa7aaaa82f59acee3074a484d3624c3e0fa06c3eb5de64edcee7f2e0ad9be806fe142065102e5384a + b2sums = 978f01e83626735cd050c111b35121ae822c3072ac341c8d72eac7fbc0d73d25a1c65426b18ed392f214838751824b109ea1f3e0df98eaf027f8347a32c0157a + b2sums = 46f294076e063b605a649b77192e07d8fc65202b324c1cd7710bca98ab8ab0397a91d2a88576108aadb5dbfce49a954ecb102b745580e6e27b0ba17f453ad53e + b2sums = 5dc5e48194d9faee60cad451d210a412731c6bb7789fdaa8c0aa481d9578e80d35710508e71f8c9d3b1fcf1e6203de712e08d190cf738a65450a0bfb247df391 + b2sums = 60e7fc9601f6da232993b620c5a44664e9e841cc86056177778d48573f3c02978090422d769e7978c373208e3c65328026cfc8dfd1b0ab6adaa9c972c240027a + b2sums = ecfaf7f66656cd9dccf84690ff7b1c80d1fa9488938d47ea299d1d47768ac13ce84c98b4f6ba727e6309e8950cc71533a8d4475154e7c6e67f43256db1530600 + b2sums = 07bc5dadb87150e68aa9b7575a6b98a504aa04463948dd47ef207daa00960f405574967d81108f016eab048f0299950de900900b2c6b727c6bb329bee768f8d0 + b2sums = ece1525b4b9b88ad92e7eb05f257abe565feceb0836b003a123efc0943b51fdc1008931d3668e1f528e983563239546bcea675247e930636e9b4625b89382fba + b2sums = ef5d838e80dc18b09b0ee18f56ee2628a882bf252d92bdf5ac9f83763cd338281172fed48b2200308e0855c7e701b8ee7cde4b6d9989a39b2bf34416edb4dc96 + b2sums = e1844449844511a6389831c4998e4bb5f9c2857e237ad9b9c038b871dd69d60a134286412e723861bede2a77f7c3d881f77382337ea646b3378162bec62eb894 + b2sums = 7663d1c666f6c03e1dbe8403d9f666070f42c6df70bf41e9bb89587c8dacd03897de050f049ff6a30732be0f11e439068f3567360cfd200b557c5c507e19de9c pkgname = londonlaw-git - diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..058ba2318df1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +# based on https://github.com/github/gitignore/blob/master/ArchLinuxPackages.gitignore +*.tar +*.tar.* +*.rpm +*.jar +*.exe +*.msi +*.zip +*.tgz +*.log +*.log.* + +*/ +*.orig +*.bak +*.backup +*.kate-swp +.directory diff --git a/128px_icon.png b/128px_icon.png Binary files differnew file mode 100644 index 000000000000..4e930e5dc224 --- /dev/null +++ b/128px_icon.png diff --git a/16px_icon.png b/16px_icon.png Binary files differnew file mode 100644 index 000000000000..2110c566bf6f --- /dev/null +++ b/16px_icon.png diff --git a/20px_icon.png b/20px_icon.png Binary files differnew file mode 100644 index 000000000000..7dcd90119ca5 --- /dev/null +++ b/20px_icon.png diff --git a/24px_icon.png b/24px_icon.png Binary files differnew file mode 100644 index 000000000000..e31d3667e70b --- /dev/null +++ b/24px_icon.png diff --git a/256px_icon.png b/256px_icon.png Binary files differnew file mode 100644 index 000000000000..da3e523a3a7d --- /dev/null +++ b/256px_icon.png diff --git a/32px_icon.png b/32px_icon.png Binary files differnew file mode 100644 index 000000000000..e0074d8a50be --- /dev/null +++ b/32px_icon.png diff --git a/36px_icon.png b/36px_icon.png Binary files differnew file mode 100644 index 000000000000..f1bcf0f3c857 --- /dev/null +++ b/36px_icon.png diff --git a/44px_icon.png b/44px_icon.png Binary files differnew file mode 100644 index 000000000000..c661ec3f8513 --- /dev/null +++ b/44px_icon.png diff --git a/48px_icon.png b/48px_icon.png Binary files differnew file mode 100644 index 000000000000..a9e0f64f3e9e --- /dev/null +++ b/48px_icon.png diff --git a/64px_icon.png b/64px_icon.png Binary files differnew file mode 100644 index 000000000000..f1307edea625 --- /dev/null +++ b/64px_icon.png diff --git a/96px_icon.png b/96px_icon.png Binary files differnew file mode 100644 index 000000000000..59de255094ff --- /dev/null +++ b/96px_icon.png @@ -1,41 +1,101 @@ -# Maintainer: Lucki <https://aur.archlinux.org/account/Lucki> +# Maintainer: +# Contributor: Marcell Meszaros < marcell.meszaros AT runbox.eu > +# Contributor: Lucki <https://aur.archlinux.org/account/Lucki> # Contributor: Nikos Kouremenos <nkourAATTfreemail.gr> pkgname=londonlaw-git -_pkgname=${pkgname%-git} -pkgver=0.3.0_pre2.r1.g35d419f -pkgrel=4 +_reponame=${pkgname%-git} +pkgver=0.3.0_pre2.r49.g832397b +pkgrel=0.1 # builds & installs, but does not run due to missing images & Python module path issues pkgdesc="Clone of the famous Scotland Yard board game with network support." arch=('any') -url="https://github.com/anyc/londonlaw" -license=('GPL2') -changelog=.CHANGELOG -depends=('python2' 'hicolor-icon-theme') -makedepends=('git' 'python2-twisted' 'wxpython' 'python2-zope-interface') -provides=("$_pkgname") -conflicts=("$_pkgname") -source=("$_pkgname::git+https://github.com/anyc/londonlaw.git" - "$_pkgname.desktop") -sha512sums=('SKIP' - '15f537cdca41dd72a37574151fba5df9cf70b02f849e72c3ffab65453ab69562209c7053454e9c065bbb657cf6c4fd982ef27edb124a6be91c690dfdfec8e9da') - -pkgver() -{ - cd "$srcdir/$_pkgname" || exit - git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +url="https://github.com/horald/${_reponame}" +license=('GPL-2.0-only') +depends=( + 'hicolor-icon-theme' + 'python' + 'python-twisted' + 'python-wxpython' +) +makedepends=( + 'git' + 'python-build' + 'python-installer' + 'python-setuptools' + 'python-wheel' +) +provides=("${_reponame}") +conflicts=("${_reponame}") +_patchfile="${_reponame}-patch-cajonKA-1-a8d7908.patch" +source=("${_reponame}::git+${url}.git" + *px_icon.png + "${_reponame}.desktop" + "${_patchfile}::https://github.com/cajonKA/londonlaw/commit/a8d79083be6a9cac899da82ad64c2e3a37fcdc8e.patch" + 'londonlaw-setup.py') +b2sums=('SKIP' + 'b5d923db2b0af49552e5d7f0e0bb554fb9a7614424228edbdc0ccbd91110faa791a646982b91391ad742c8cb6d4ae75db7c61b44215ba8589c003f1524f829d2' + '27121f1258ba15cc0ec62025932b57650c6949c2789d18ac544d4199f49621cc6c1c9c211dbbc6b3d015766c79ad2f3708f19b9dadf4e804cb4bce48808370e3' + 'c8afadce0249fb9b9a98facf293a0502ca4435ea3b37781d3cec01a422bc5bfd9716861fd2a8f74777f45b2328d65918faf19d2a93553984490856ef0c4a4ff8' + '4894b5356b8b06f02fa91c1bc99ec4c4b37590cef078774aa7aaaa82f59acee3074a484d3624c3e0fa06c3eb5de64edcee7f2e0ad9be806fe142065102e5384a' + '978f01e83626735cd050c111b35121ae822c3072ac341c8d72eac7fbc0d73d25a1c65426b18ed392f214838751824b109ea1f3e0df98eaf027f8347a32c0157a' + '46f294076e063b605a649b77192e07d8fc65202b324c1cd7710bca98ab8ab0397a91d2a88576108aadb5dbfce49a954ecb102b745580e6e27b0ba17f453ad53e' + '5dc5e48194d9faee60cad451d210a412731c6bb7789fdaa8c0aa481d9578e80d35710508e71f8c9d3b1fcf1e6203de712e08d190cf738a65450a0bfb247df391' + '60e7fc9601f6da232993b620c5a44664e9e841cc86056177778d48573f3c02978090422d769e7978c373208e3c65328026cfc8dfd1b0ab6adaa9c972c240027a' + 'ecfaf7f66656cd9dccf84690ff7b1c80d1fa9488938d47ea299d1d47768ac13ce84c98b4f6ba727e6309e8950cc71533a8d4475154e7c6e67f43256db1530600' + '07bc5dadb87150e68aa9b7575a6b98a504aa04463948dd47ef207daa00960f405574967d81108f016eab048f0299950de900900b2c6b727c6bb329bee768f8d0' + 'ece1525b4b9b88ad92e7eb05f257abe565feceb0836b003a123efc0943b51fdc1008931d3668e1f528e983563239546bcea675247e930636e9b4625b89382fba' + 'ef5d838e80dc18b09b0ee18f56ee2628a882bf252d92bdf5ac9f83763cd338281172fed48b2200308e0855c7e701b8ee7cde4b6d9989a39b2bf34416edb4dc96' + 'e1844449844511a6389831c4998e4bb5f9c2857e237ad9b9c038b871dd69d60a134286412e723861bede2a77f7c3d881f77382337ea646b3378162bec62eb894' + '7663d1c666f6c03e1dbe8403d9f666070f42c6df70bf41e9bb89587c8dacd03897de050f049ff6a30732be0f11e439068f3567360cfd200b557c5c507e19de9c') + +prepare() { + cd "${_reponame}" + + echo "Applying ${_patchfile}..." + git apply -p1 --verbose "../${_patchfile}" + echo "Done." + + echo "Adding working setup.py file..." + cp -fv ../londonlaw-setup.py setup.py + echo "Done." + + echo "Fixing obsolete metadata names..." + sed -e 's/force-manifest=/force_manifest=/' \ + -i setup.cfg + echo "Done." + + echo "Renaming executables to their original name without .py extension..." + mv -fv londonlaw/london-client.py londonlaw/london-client + mv -fv londonlaw/london-server.py londonlaw/london-server + echo "Done." +} + +pkgver() { + cd "${_reponame}" + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd "${_reponame}" + python -m build --wheel --no-isolation } -package() -{ - cd "$srcdir" || exit - install -Dm644 "$_pkgname.desktop" "$pkgdir/usr/share/applications/$_pkgname.desktop" +package() { + cd "${_reponame}" + python -m installer --destdir="${pkgdir}" dist/*.whl - cd "$_pkgname" || exit - python2 setup.py install --root="$pkgdir" --prefix=/usr --optimize=1 + install -Dm644 "../${_reponame}.desktop" "${pkgdir}/usr/share/applications/${_reponame}.desktop" - # https://lists.archlinux.org/pipermail/aur-general/2011-November/016777.html - mkdir -p "$pkgdir/usr/share/doc/$_pkgname" - cp -dpr --no-preserve=ownership "doc/." "$pkgdir/usr/share/doc/$_pkgname" + # https://lists.archlinux.org/pipermail/aur-general/2011-November/016777.html + install -dm0755 "${pkgdir}/usr/share/doc/${pkgname}" + cp -dpr --no-preserve=ownership "doc/." "${pkgdir}/usr/share/doc/${pkgname}" - install -Dm644 "$_pkgname/guiclient/images/playericon0.jpg" "$pkgdir/usr/share/icons/hicolor/48x48/apps/$_pkgname.jpg" + # icons + cd "${srcdir}" + echo "Installing hicolor icons..." + for _iconfile in *px_icon.png + do + install -v -Dm644 "${_iconfile}" "${pkgdir}/usr/share/icons/hicolor/${_iconfile%px_icon.png}x${_iconfile%px_icon.png}/apps/${_reponame}.png" + done + echo "Done." } diff --git a/londonlaw-setup.py b/londonlaw-setup.py new file mode 100644 index 000000000000..c76d8ddd9edd --- /dev/null +++ b/londonlaw-setup.py @@ -0,0 +1,151 @@ +#!/usr/bin/env python +# +# Distutils installation script for London Law +# +from setuptools import setup +import io, os, string, sys + +def read(*paths, **kwargs): + """Read the contents of a text file safely. + >>> read("project_name", "VERSION") + '0.1.0' + >>> read("README.md") + ... + """ + + content = "" + with io.open( + os.path.join(os.path.dirname(__file__), *paths), + encoding=kwargs.get("encoding", "utf8"), + ) as open_file: + content = open_file.read().strip() + return content + + +def read_requirements(path): + return [ + line.strip() + for line in read(path).split("\n") + if not line.startswith(('"', "#", "-", "git+")) + ] + + +# Generate the binary translation files +if 'sdist' in sys.argv: + os.system("cd londonlaw/locale && make mo") + os.system("cd doc && make") + + +# Read off the PREFIX value, so we can tell londonlaw where to find its +# data files (FIXME: is there a clean way to handle this through distutils?) +if 'sdist' not in sys.argv and 'clean' not in sys.argv: + DATA_PREFIX=os.path.normpath(sys.prefix)+"/share/" # default + for arg in sys.argv: + index = arg.find("--install-data=") + if index > -1: + DATA_PREFIX = os.path.normpath(arg[(index+len("--install-data=")):]) + + config = open("londonlaw/common/config.py", "w") + config.write("MEDIAROOT = \"" + os.path.join(DATA_PREFIX,"londonlaw/guiclient") + "\"\n") + config.close() + + +# Append "dirname" and its datafiles to the list of files to install. +# This is called once per directory via os.path.walk(). +def appendImageFiles(installList, dirname, files): + newFiles = [] + for file in files: + if file[-3:] != ".id" and file[-3:] != "=id": # don't install Arch id files + fullFile = os.path.join(dirname, file) + if os.path.isfile(fullFile): + newFiles.append(fullFile) + if newFiles != []: + splitDir = dirname.split('/') + dirname = ('/').join(splitDir[1:]) + installList.append( (os.path.join(DATA_PREFIX, 'londonlaw', dirname), newFiles) ) + #installList.append( (dirname, newFiles) ) + + +def appendMOFiles(installList, dirname, files): + newFiles = [] + for file in files: + if file[-3:] == ".mo": + newFiles.append(os.path.join(dirname, file)) + if newFiles != []: + splitDir = dirname.split('/') + dirname = ('/').join(splitDir[1:]) + installList.append( (os.path.join(DATA_PREFIX, 'londonlaw', dirname), newFiles) ) + #installList.append( (dirname, newFiles) ) + + +# Get all data files by walking through the proper directory trees +# and calling 'appendDataFiles'. +def getDataFilesList(): + installList = [] + os.walk('londonlaw/guiclient/images', appendImageFiles, installList) + os.walk('londonlaw/locale', appendMOFiles, installList) + return installList + +## Run the distutils setup. +#setup(name = "londonlaw", +# version = "0.3.0pre2", +# description = "Networke clone of the famous Scotland Yard manhunt board game", +# author = "Paul J. Pelzl", +# author_email = "pelzlpj@eecs.umich.edu", +# maintainer = "Paul J. Pelzl", +# maintainer_email = "pelzlpj@eecs.umich.edu", +# url = "https://github.com/horald/londonlaw", +# license = "GNU General Public License, Version 2", +# platforms = "*nix/X11, OS X, Win32", +# keywords = "Scotland Yard board game multiplayer", +# long_description = ( +# "London Law is a networked multiplayer adaptation of the classic\n" + +# "Scotland Yard board game. Mr. X must evade a number of detectives by\n" + +# "carefully concealing his movements across London. One of only a\n" + +# "handful of asymmetric board games (Mr. X and the detectives have\n" + +# "different goals and abilities)." ), +# packages = [ 'londonlaw', # install all the .py files +# 'londonlaw.common', +# 'londonlaw.server', +# 'londonlaw.guiclient', +# 'londonlaw.aiclients', +# 'londonlaw.adminclient'], +# scripts = [ 'londonlaw/london-server', # install the executable scripts +# 'londonlaw/london-client', +# 'londonlaw/london-admin'], +# data_files = getDataFilesList() # install the game media and documentation +#) + + +# Reset 'config.py' for the source distribution. +config = open("londonlaw/common/config.py", "w") +config.write("MEDIAROOT = \"guiclient\"\n") +config.close() +setup( + name="londonlaw", + version="0.3.0pre2", + description="Clone of the famous Scotland Yard board game", + url="https://github.com/horald/londonlaw", + license = "GNU General Public License, Version 2", + platforms = "*nix/X11, OS X, Win32", + author = "Paul J. Pelzl", + maintainer = "horald", + keywords = "Scotland Yard board game multiplayer", + long_description = ( + "London Law is a networked multiplayer adaptation of the classic\n" + + "Scotland Yard board game. Mr. X must evade a number of detectives by\n" + + "carefully concealing his movements across London. One of only a\n" + + "handful of asymmetric board games (Mr. X and the detectives have\n" + + "different goals and abilities)." ), + packages = [ 'londonlaw', # install all the .py files + 'londonlaw.common', + 'londonlaw.server', + 'londonlaw.guiclient', + 'londonlaw.aiclients', + 'londonlaw.adminclient'], + scripts = [ 'londonlaw/london-server', # install the executable scripts + 'londonlaw/london-client', + 'londonlaw/london-admin.py'], + install_requires=read_requirements("requirements.txt"), + data_files = getDataFilesList() # install the game media and documentation +) |