You are not logged in.

#1 2021-10-06 17:56:19

dbl
Member
Registered: 2021-10-06
Posts: 2

PKGBUILD libcgif

Hi all,

I would like to publish a PKGBUILD script for libcgif into AUR:  https://github.com/dloebl/cgif
cgif is a simple GIF encoding library that is subject to be included as the GIF encoding layer into libvips (image processing library): https://github.com/libvips/libvips
It's the first time creating a PKGBUILD for me. Feedback appreciated :-)

# Maintainer: Daniel Löbl <dloebl.2000@gmail.com>
pkgname=libcgif
pkgver=0.0.1
pkgrel=1
pkgdesc="A fast and lightweight GIF encoding library"
arch=('x86_64')
url="https://github.com/dloebl/cgif"
license=('MIT')
makedepends=('meson' 'ninja')
depends=('glibc')
source=("$pkgname-$pkgver.tar.gz::https://github.com/dloebl/cgif/archive/refs/tags/V$pkgver.tar.gz")
sha256sums=('4e61d6bd387182f5e0090de49197084a8676e9f5aeac0d61562f52c553d71598')

build() {
 cd "$srcdir/cgif-$pkgver/"
 arch-meson build/ --backend=ninja --optimization=2
 meson compile -C build/
}
package() {
 mkdir -p "$pkgdir/usr/lib/" "$pkgdir/usr/include/" "$pkgdir/usr/share/licenses/$pkgname/"
 meson install -C "cgif-$pkgver/build/" --destdir "$pkgdir"
 cp "$srcdir/cgif-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/."
}
check() {
 meson test -C "cgif-$pkgver/build/"
}

Thanks in advance.

Last edited by dbl (2021-10-07 18:52:05)

Offline

#2 2021-10-07 09:22:16

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 9,573

Re: PKGBUILD libcgif

Not bad for a first PKGBUILD, but I do have some comments

- ninja should be added to makedepends

- check https://wiki.archlinux.org/title/Meson_ … guidelines

-

source=(https://github.com/dloebl/cgif/archive/$_commithash.tar.gz)

It looks like you made a release from that commit, can you use the url for it ? (https://github.com/dloebl/cgif/archive/ … 0.1.tar.gz

Also check https://wiki.archlinux.org/title/PKGBUILD#Sources

- are you sure there are no runtime dependencies needed ?


Welcome to Archlinux Forums


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
Did you use the guided installer ? If yes, I can't help you.

(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2021-10-07 19:03:17

dbl
Member
Registered: 2021-10-06
Posts: 2

Re: PKGBUILD libcgif

Thanks for the feedback! I've edited the code.

Lone_Wolf wrote:

are you sure there are no runtime dependencies needed ?

The only runtime dependency is a C library - but of course it does not hurt to add glibc to depends=().

By the way: Should I explicitly set the correct permission flags in my PKGBUILD or will makepkg / pacman take care of this (e.g. making an executable runnable)?

File: libcgif.so.0.0.1
Access: (0755/-rwxr-xr-x)  Uid: ( 1000/     dbl)   Gid: ( 1000/     dbl)

Offline

#4 2021-10-07 20:15:45

loqs
Member
Registered: 2014-03-06
Posts: 14,230

Re: PKGBUILD libcgif

From the installed libcgif-0.0.1-1-x86_64.pkg.tar.zst

ls -l /usr/lib/libcgif.so.0.0.1 
-rwxr-xr-x 1 root root 18104 Oct  7 20:10 /usr/lib/libcgif.so.0.0.1

As a note libraries in general do not need to be executable but it is not an issue is they are.  The library is owned root:root so both permissions and ownership look fine.

Last edited by loqs (2021-10-07 20:15:55)

Offline

Board footer

Powered by FluxBB