You are not logged in.
Pages: 1
Hello
I'm trying to create packages for my programs for Arch Linux.
I think it's not so bad.
Here is the PKGBUILD, the zst generated by openSUSE build farm is good (I think).
There is a difference between it and my packages for Fedora and openSUSE the binary is in /usr/local/bin, not in /usr/bin.
pkgname=awf-gtk3
pkgver=2.7.0
pkgrel=1
pkgdesc="Theme preview application for GTK"
arch=(any)
url="https://github.com/luigifab/awf-extended"
license=(GPL3)
depends=(gtk3) #hicolor-icon-theme
#makedepends=(autoconf automake desktop-file-utils gcc gettext gtk3)
source=("awf-extended-$pkgver.tar.gz")
md5sums=("c4d8afcf9fc230d1fc086ddf4dfbcd52")
# https://download.opensuse.org/repositories/home:/luigifab/Arch/x86_64/
# https://raw.githubusercontent.com/luigifab/awf-extended/levelup/opensuse-gtk3/awf-gtk3.spec
# https://raw.githubusercontent.com/luigifab/awf-extended/levelup/fedora-gtk3/awf-gtk3.spec
# https://github.com/luigifab/awf-extended/archive/v${pkgver}/awf-extended-${pkgver}.tar.gz
# github tarball checksum
prepare() {
mv "awf-extended-$pkgver" "$pkgname-$pkgver"
cd "$pkgname-$pkgver"
sed -i 's/ -eq 2/ -eq -1/g' configure.ac
sed -i 's/ -eq 4/ -eq -1/g' configure.ac
touch {NEWS,AUTHORS,README,ChangeLog}
mv LICENSE COPYING
}
build() {
cd "$pkgname-$pkgver"
autoreconf -fi
./configure
make -s
}
package() {
cd "$pkgname-$pkgver"
make DESTDIR="$pkgdir/" install
mkdir -p "$pkgdir/usr/share/applications/"
mkdir -p "$pkgdir/usr/share/doc/$pkgname/"
mkdir -p "$pkgdir/usr/share/icons/hicolor/"
mkdir -p "$pkgdir/usr/share/licenses/$pkgname/"
mkdir -p "$pkgdir/usr/share/man/man1/" "$pkgdir/usr/share/man/fr/man1/"
for file in icons/*/*/*; do mv $file ${file/\/awf./\/$pkgname.}; done
cp -a icons/* "$pkgdir/usr/share/icons/hicolor/"
for file in src/po/*.po; do
code=$(basename "$file" .po)
mkdir -p "$pkgdir/usr/share/locale/$code/LC_MESSAGES/"
msgfmt src/po/${code}.po -o "$pkgdir/usr/share/locale/$code/LC_MESSAGES/$pkgname.mo"
done
install -p -m 644 README.md "$pkgdir/usr/share/doc/$pkgname/"
install -p -m 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/"
install -p -m 644 "debian-gtk/$pkgname.1" "$pkgdir/usr/share/man/man1/$pkgname.1"
install -p -m 644 "debian-gtk/$pkgname.fr.1" "$pkgdir/usr/share/man/fr/man1/$pkgname.1"
desktop-file-install --dir="$pkgdir/usr/share/applications/" "applications/$pkgname.desktop"
}
Questions:
- do I use makedepends()?
- I'm not sure for the source file, do I use the tarball used by Fedora/openSUSE (ie generated by github), or do I use the tarball generated and published by me? or do I use git clone?
- except comments, is my PKGBUILD acceptable?
Thanks
Last edited by luigifab (2023-10-11 17:28:52)
Offline
- do I use makedepends()?
autoconf automake gcc are dependencies of base-devel and so do not need to be listed. gtk3 is in depends and all global depends will be installed at build time. gettext will always be installed as a dependency of pacman. desktop-file-utils is a dependency of gtk3. So i would drop all but the last two I have mentioned which I think are debatable.
- I'm not sure for the source file, do I use the tarball used by Fedora/openSUSE (ie generated by github), or do I use the tarball generated and published by me? or do I use git clone?
What is the difference between the tarballs?
- except comments, is my PKGBUILD acceptable?
Files should never be installed to /usr/local Arch_package_guidelines#Package_etiquette
arch=(any)
As upstream could you add the installation of all the files currently manually installed to the Makefile?
Last edited by loqs (2023-10-13 12:49:17)
Offline
Thanks! I update it and come back.
For the Makefile, I don't how it works, if I have time I will search.
Edit: all issues fixed.
Last edited by luigifab (2023-11-11 21:18:50)
Offline
Pages: 1