@jaxvanyang
Hmm... There should be an option somewhere to include files like how I do for the binary.
I'm a little busy now so I'll check it and update you in like... 4-5 hrs
Git Clone URL: | https://aur.archlinux.org/smassh.git (read-only, click to copy) |
---|---|
Package Base: | smassh |
Description: | TUI based typing test application inspired by MonkeyType |
Upstream URL: | https://github.com/kraanzu/smassh |
Licenses: | GPL-3.0-only |
Submitter: | kraanzu |
Maintainer: | kraanzu (jaxvanyang) |
Last Packager: | kraanzu |
Votes: | 4 |
Popularity: | 0.93 |
First Submitted: | 2024-01-26 19:44 (UTC) |
Last Updated: | 2024-10-01 08:08 (UTC) |
« First ‹ Previous 1 2
@jaxvanyang
Hmm... There should be an option somewhere to include files like how I do for the binary.
I'm a little busy now so I'll check it and update you in like... 4-5 hrs
@kraanzu
smassh can be built and installed with this PKGBUILD:
# Maintainer: Jax Young <jaxvanyang@gmail.com>
# Maintainer: Murli Tawari <kraanzu@gmail.com>
pkgname=smassh
pkgver=3.1.2
pkgrel=2
pkgdesc="TUI based typing test application inspired by MonkeyType"
url="https://github.com/kraanzu/smassh"
arch=('any')
license=('GPL-3.0-only')
depends=(
'python>=3.8'
'python-textual>=0.52.1'
'python-appdirs>=1.4.4'
'python-click>=8.1.7'
'python-requests>=2.31.0'
)
makedepends=(
'python-build'
'python-installer'
'python-wheel'
'python-poetry-core>=1.0.0'
)
source=("$pkgname-$pkgver.tar.gz::${url}/archive/v$pkgver.tar.gz")
sha256sums=('c7cde89ba0442c56f9c8953a0cdd4653c276f7ded3398874f45812b12384a011')
build() {
cd "$pkgname-$pkgver"
python -m build --wheel --no-isolation
}
package() {
cd "$pkgname-$pkgver"
python -m installer --destdir "$pkgdir" dist/*.whl
}
But when I ran it, I got:
Traceback (most recent call last):
File "/usr/sbin/smassh", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1666, in invoke
rv = super().invoke(ctx)
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/smassh/__main__.py", line 24, in main
Smassh().run()
^^^^^^^^
File "/usr/lib/python3.11/site-packages/smassh/ui/tui.py", line 89, in __init__
self.action_theme(config_parser.get("theme"))
File "/usr/lib/python3.11/site-packages/smassh/ui/tui.py", line 115, in action_theme
generate_theme_file(theme)
File "/usr/lib/python3.11/site-packages/smassh/src/css_generator.py", line 25, in generate_theme_file
with open(target_file, "w") as target:
^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.11/site-packages/smassh/ui/css/styles.tcss'
This is because smassh use a system path for the merged theme file. Maybe we can make it stored in ~/.config/smassh
like the config.
Hey Hey @jaxvanyang!
Sorry for the delayed response, Yea it works
You can change the PKGBUILD/SRCINFO for the non-binary/source and I can review/test it as well
Thank you so much :)
I have created the smassh-bin package, and added you as comaintainer. If that looks good to you, I'll begin making smassh built from source.
@kraanzu
I suppose we can't rename the packages? If you need to create new packages for source/binary feel free to do so and you can add me as a co-maintainer there :)
Yes, we can't. So I will create a -bin package first, then make this smassh package built from source, and pin a comment here to notice people who wants -bin package.
Hey @jaxvanyang!
I added you as a co-maintainer on both of the packages <3
Also, Great suggestions, and thanks for pointing them out
I intentionally orphaned packages built from the source because all the dependencies weren't updated (I'm not really sure about other methods to package but feel free to share anything) but yeah, we can add -bin!
I suppose we can't rename the packages? If you need to create new packages for source/binary feel free to do so and you can add me as a co-maintainer there :)
Again, Thanks for the help man. Really appreciate it <3
@kraanzu
[Do I need to give you any permissions or something?]
Yes, there is a comaintainers page for each package. You need to add me there: https://aur.archlinux.org/pkgbase/smassh/comaintainers
According to AUR submission guidelines:
Packages that use prebuilt deliverables, when the sources are available, must use the -bin suffix.
I think maybe we should move this package to smassh-bin, and smassh will be a package built from source. Of course, I can do that for you.
PKGBUILD recommends not include package name is the description. So should we change it to TUI based typing test application inspired by MonkeyType
?
I also have a similar package: https://aur.archlinux.org/packages/dooit
It'd be great if you could co-maintain that as well :D
I'll take a look if you also give permission of that package.
Hey, @jaxvanyang!
Thanks, I didn't know that
It'd be great if you could co-maintain the package as well! (Definitely, you know more about this than me)
[Do I need to give you any permissions or something?]
I also have a similar package: https://aur.archlinux.org/packages/dooit
It'd be great if you could co-maintain that as well :D
Thanks!!!
Please name the source binary with a unique name, or with some AUR helper like paru
, old binary cache will be used.
I recommend the modification below, also add checksum and remove some redundant lines:
diff --git a/.SRCINFO b/.SRCINFO
index 6f56242..8337134 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,13 @@
pkgbase = smassh
pkgdesc = Smassh your Keyboard, TUI Edition
pkgver = 3.1.2
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/kraanzu/smassh
arch = any
license = GPL-3.0
depends = python
depends = git
- source = https://github.com/kraanzu/smassh/releases/download/v3.1.2/linux-smassh
- sha256sums = SKIP
+ source = smassh-3.1.2::https://github.com/kraanzu/smassh/releases/download/v3.1.2/linux-smassh
+ sha256sums = 251576c3dc9ae25daf8df9541104bb98152284c6c3320d05112b54364abaf0e8
pkgname = smassh
diff --git a/PKGBUILD b/PKGBUILD
index 3eb81f7..8d1121f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,23 +3,17 @@
pkgname=smassh
_pkgname=${pkgname}
pkgver=3.1.2
-pkgrel=1
+pkgrel=2
pkgdesc="Smassh your Keyboard, TUI Edition"
url="https://github.com/kraanzu/smassh"
arch=('any')
license=('GPL-3.0')
depends=('python' 'git')
makedepends=()
-source=("${url}/releases/download/v${pkgver}/linux-${pkgname}")
-sha256sums=('SKIP')
-
-prepare() {
- cd "${srcdir}"
- chmod +x "linux-${pkgname}"
- mv "linux-${pkgname}" "${pkgname}"
-}
+source=("$pkgname-$pkgver::${url}/releases/download/v${pkgver}/linux-${pkgname}")
+sha256sums=('251576c3dc9ae25daf8df9541104bb98152284c6c3320d05112b54364abaf0e8')
package() {
- install -Dm0755 "$pkgname" "$pkgdir/usr/bin/$pkgname"
+ install -Dm0755 "$pkgname-$pkgver" "$pkgdir/usr/bin/$pkgname"
}
BTW, if you agree, I can co-maintain this package.
Pinned Comments
jaxvanyang commented on 2024-03-27 01:39 (UTC)
As discussed, smassh has been turned into a source package. The pyinstaller binary can be installed with the smassh-bin package. If you want the binary released on GitHub, you should install smassh-bin instead. But normally, these two make no difference.