Add to the AUR
deter0 opened this issue · 29 comments
I can do this
The PKGBUILD would probably look like this:
# Maintainer: alba4k <blaskoazzolaaaron@gmail.com>
pkgname=xborder-git
pkgver=3.0.r48.68cb3bf
pkgrel=1
pkgdesc="Active window border replacement for window managers. "
arch=(x86_64)
url="https://github.com/deter0/xborder"
license=('Unlicense')
makedepends=(git)
depends=('python-cairo' 'libwnck3' 'gtk3')
source=("git+$url")
md5sums=('SKIP')
pkgver() {
cd xborder
printf "$(cat version.txt).r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
cd xborder
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
install -Dm644 README.md "$pkgdir/usr/share/doc/${pkgname}/README.md"
chmod +x xborders
install -Dm644 xborders "$pkgdir/usr/bin/xborders"
echo -e "\e[33m\e[1mREMINDER\e[0m: Please add \"role = 'xborder'\" to the blur-background-exclude section in the configuration file for your compositor!"
}
And the .SRCINFO would look like this:
pkgbase = xborder-git
pkgdesc = Active window border replacement for window managers.
pkgver = 3.0.r48.68cb3bf
pkgrel = 1
url = https://github.com/deter0/xborder
arch = x86_64
license = Unlicense
makedepends = git
depends = python-cairo
depends = libwnck3
depends = gtk3
source = git+https://github.com/deter0/xborder
md5sums = SKIP
pkgname = xborder-git
The main question I'd ask myself is:
@deter0 , would it be OK for you if I mantained an AUR package named xborder
? I'm currently using the description you provided for the github repository? please also double check the package version (I'm currently using version.txt and adding some git info)
Also, I'm currently using gtk3 as dependency for archlinux, since I guess that what most people probably already have installed. Should I use something else? Should I maybe add some architectures other than arm64? Any other reccomendations? For what I'm concerned, the package could go online even like this.
It would also maybe be better to curl the single files from raw.githubusercontent.com, and remove the git make dependency, but it's way easier like this
Yes it would be great if you maintained it! Yes the package version will always be package.txt. But could you rename it xborders naming it xborder was a mistake and I changed it. Yes gtk3 is fine. I don't know about multiple architectures, how would that work? Also git is fine, anyone who has installed arch linux probably has git installed, it is needed for installing a bunch of stuff so it shouldn't be a problem
lmao, I just realized I forgot a dependency on python (minor issue, since it would still be installed with python-pycairo, but it doesn't hurt to leave it explicit)
I will get it upstream as soon as possible, which will probably mean saturday
as for multiple architectures, it should be fine with python, but it would need testing, so I'll leave x64 atm
I'm very sorry, I read this issue too late. I thought no one had thought of it yet.
I have already added the project to the AUR as xborder-git.
I was just creating an issue to ask if anyone else would like to be a maintainer before reading this.
@deter0 @alba4k I can disown the package if some of you are interested so you can get the maintainer status on the package. Otherwise, you can create another AUR package as xborder but I think that is a bit useless.
problem is, now we can't rename it
problem is, now we can't rename it
I don't think you need to rename it: following the AUR guidelines the package name is correct due to the build being made directly from the source.
When I created the package on the AUR I precisely thought of not naming it xborder
as there might be actual releases in the future and the name would be up to that.
what I mean is: @deter0 was asking to name it
xborders-git
, plural
I understand now, however, if you think that is required I can create a deletion request from the AUR.
Maybe I can do a fix to find version.txt somewhere else, but it would be better to fix the AUR package instead of patch it
I mean it's not that big of a deal, xborder-git is fine. But there are some problems with the package
This is related to this line:
Line 51 in fa50c90
Is not a problem with the AUR package. I mean In the PKGBUILD
I can move the version.txt
in /usr/bin
so the command --version
works but the /usr/bin
directory is intended for the executables, not for other files.
You should change the way you print the version or change the directory in which version.txt
is read.
My advice is to insert it directly in the code (xborders
) instead of in the version.txt
file.
However, as I said I can disown the package and leave it to you.
Yes can you tell me how to become maintainer of the package?
Yes can you tell me how to become maintainer of the package?
I think that the best way is to initially add you as a co-maintainer and after that, I will promote you as a maintainer or simply disown the package so you will become the only maintainer.
I can also add @alba4k if is needed and if you agree I can remain co-maintainer to support the package.
So I need to know which is your AUR username.
would be fine for me, not really my decision
I can mantain this if needed, would really not be an issue on my side
would be fine for me, not really my decision
I can mantain this if needed, would really not be an issue on my side
Added. I think more is better.
Maybe I can do a fix to find version.txt somewhere else, but it would be better to fix the AUR package instead of patch it
Offtopic
If you want to keep the version.txt
file my advice is to place it in ~/.config/xborders/
along with the config.json
.
This is exactly what I've done to exec xborders on startup using i3
:
# Last line in ~/.config/i3/config
exec --no-startup-id xborders --config $HOME/.config/xborder/config.json --disable-version-warning
--disable-version-warning dont work, it still notify me with ERROR: xborders couldn*t get latest version!
so that is not a fix for this, can the version.txt and the update_ignore.txt be move to .cache/xborder/
For version.txt can't we place it in ~/.local/share/xborders and all other files needed?
package() {
cd xborder
mkdir $pkgdir/opt/xborders -p
install -Dm644 * $pkgdir/opt/xborders -v
printf "#!/bin/sh\npython3 /opt/xborders/xborders \$@\n" >> xborders-ln
chmod +x xborders-ln
install -Dm+xr xborders-ln "$pkgdir/usr/bin/xborders"
}
Can we not do something like this?
I tested it seems fine, only problem would be when I create files in the xborders directory. I only do this for ignoring version update notification, but I can just check if we're installed by AUR to disable the updates.
checking if installed by aur would be easily done by putting a echo aur > /opt/xborders/source
and checking the file content, or something similar (e.g. toch /opt/xborders/aur
)
or, better but slower, using libalpm, but I'm not sure how we would go on that in python, maybe it would just be worth it to directly run pacman -Q xborders-git
and check if the package seems to be installed (since pacman is really fast, this shouldn't take more than ~10ms, and just when launching, so it should be fairly acceptable. using alpm wouldn't result in a huge performance gain)
Can we not check the path of executable? and if it's in /opt/ we can determine its installed by AUR
we could, but I often put stuff in /opt when it would belong there, even if I didn't install it trough the package manager (since that's where it would belong)
I doubt someone would crete something like a file named aur just because
Sorry but I don't understand why you need a file to store the version. Why you can't simply create a constant directly in the script?
you mean by modifying in the pkgbuild?
then yes, obviously
I mean how would be go on detecting if the script was installed from the aur or not?
then yes, obviously
I mean how would be go on detecting if the script was installed from the aur or not?
Why do you need to know that?