You are not logged in.
I'm just asking for help. I tried but it didn't work.
I'm new to the python world and I don't know how to pack an AUR app. I would ask you to point me to what I should pay attention to, considering that I don't understand git the best also...
So, my app is here:
https://github.com/Pyntux/TimerDown
a small app, but it's mine
I do not speak English, but I understand...
Offline
What did you try that didn't work? This should be trivial, so you probably just missed something small.
Last edited by Scimmia (2021-02-21 23:36:08)
Offline
I tried to make PKGBUILd...
I do not know do I need to first package this following python instructions, then make PKGBUILD or just make PKGBUILD with git clone option? Can you point me to an example what to do?
I do not speak English, but I understand...
Offline
Post your PKGBUILD. You can browse existing python PKGBUILDs in the AUR or the official repos if you need more examples than /usr/share/pacman/PKGBUILD.proto
Last edited by graysky (2021-02-22 10:46:10)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
pkgname=timerdown-git
pkgver=r75.g11ba12c
pkgrel=1
pkgdesc="A simple python & pyQT5 app to turn off your PC in 'X' minutes"
url="https://github.com/Pyntux/TimerDown"
arch=('any')
license=('GPL3')
depends=('python-pyqt5')
makedepends=('git')
provides=("${pkgname%-*}")
conflicts=("${pkgname%-*}")
source=("${pkgname%-*}::git+${url}.git")
sha256sums=('SKIP')
pkgver() {
cd "${pkgname%-*}"
printf "r%s.g%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
cd "${pkgname%-*}"
install -d "$pkgdir"/usr/{bin,share/timerdown}
cp -r {icons,TimerDown.py} "$pkgdir/usr/share/${pkgname%-*}"
echo "#!/bin/sh
python /usr/share/timerdown/TimerDown.py" >> "$pkgdir/usr/bin/${pkgname%-*}"
chmod +x "$pkgdir/usr/bin/${pkgname%-*}"
}
Offline
@metak
Great! Thank you very much!
Can you explain me about pkgver a bit? Where to get that info?
Everything else is cristal clear, except runing app from terminal "timerdown", which call bash script, starts app but without icons from icons dir in /usr/share/timerdown...
OK, I could make resources file for that...
Last edited by Pyntux (2021-02-22 15:09:29)
I do not speak English, but I understand...
Offline
Can you explain me about pkgver a bit? Where to get that info?
Offline
OK, thanks
I do not speak English, but I understand...
Offline
starts app but without icons from icons dir in /usr/share/timerdown...
That's an error in your code, not in the packaging. As written, your code assumes that the current working directory is next to the icon directory - that is a very bad assumption. Use absolute paths (constructed from the appropriate python variable for getting resource directories).
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
@Pyntux
As others have linked the wiki links for creating pkgbuild files you should check them out, because it's all in there.
Regarding the script, it's to make it integrate better so it's easier to launch. Missing icons are because the you're supposed to be in the same directory when launching the app.?
echo "#!/bin/sh
cd /usr/share/timerdown && python TimerDown.py" >> "$pkgdir/usr/bin/${pkgname%-*}"
Offline
Yes, app is not made to launch that way, noob mistake, I am very, very new in programing.... I gonna change code...
With resource file everything works great... So... git push....
##### EDIT:
I added timerdown.desktop, timerdown.ico for desktop file and resources file, and change code to use that resources file.... I will eventualy delete icons dir from git etc...
Here is PKGBUILD now:
pkgname=timerdown-git
pkgver=r82.gc2d001f
pkgrel=1
pkgdesc="A simple python & pyQT5 app to turn off your PC in 'X' minutes"
url="https://github.com/Pyntux/TimerDown"
arch=('any')
license=('GPL3')
depends=('python-pyqt5')
makedepends=('git')
provides=("${pkgname%-*}")
conflicts=("${pkgname%-*}")
source=("${pkgname%-*}::git+${url}.git")
sha256sums=('SKIP')
pkgver() {
cd "${pkgname%-*}"
printf "r%s.g%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
cd "${pkgname%-*}"
install -d "$pkgdir"/usr/{bin,share/timerdown,share/applications}
cp -r {resources.py,timerdown.ico,TimerDown.py} "$pkgdir/usr/share/${pkgname%-*}"
cp -r {TimerDown.desktop,} "$pkgdir/usr/share/applications/${pkgname%-*}.desktop"
echo "#!/bin/sh
python /usr/share/timerdown/TimerDown.py" >> "$pkgdir/usr/bin/${pkgname%-*}"
chmod +x "$pkgdir/usr/bin/${pkgname%-*}"
}
Last edited by Pyntux (2021-02-22 16:27:44)
I do not speak English, but I understand...
Offline
Congratulations! I ran makepkg and the package installed correctly. I would suggest simplifying your pkgver naming scheme that is easy to follow.
Some notes on the app:
You can't resize the window.
Default window too small (particularly on a 4K).
Would be nice to have an Enabled/Disabled button.
EDIT: And the reset button hangs.
Last edited by d_fajardo (2021-02-22 17:54:00)
Offline
@d_fajardo
First, thank you!
The application code is very rough, there is room for repairs ...I will pay attention to all your suggestions and as much as my modest knowledge allows, I will fix what I can ...
https://aur.archlinux.org/packages/timerdown-git/
Last edited by Pyntux (2021-02-22 21:38:53)
I do not speak English, but I understand...
Offline