You are not logged in.

#1 2019-02-26 05:44:40

Batou
Member
Registered: 2017-01-03
Posts: 259

[Solved] New PKGBUILD review request

Hi all,

Would one of you experts please check this PKGBUILD.

There's a package currently in AUR that's old and doesn't work (it installs a 32-bit binary) and the maintainer is not fixing it. I left him a message and flagged the package but there has been no activity on it.  I got bored tonight and decided to fix it myself and create a new package.

Package in question: https://aur.archlinux.org/packages/mtn/  (maybe this package should be rm'ed).

Proposed new package below: mtn-git

 
# Maintainer: Batou <batou at cryptolab dot net>
pkgname=mtn-git
pkgver=r93.20b9e6e
pkgrel=1
pkgdesc="Movie Thumbnailer (mtn) saves thumbnails (screenshots) of movie or video files to image files (jpg, png)"
arch=('x86_64')
url="https://gitlab.com/movie_thumbnailer/mtn"
license=('GPL2')
groups=()
depends=('ffmpeg' 'gd')
makedepends=('git') # 'bzr', 'git', 'mercurial' or 'subversion'
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
replaces=()
backup=()
options=()
install=
source=('git+https://gitlab.com/movie_thumbnailer/mtn.git')
noextract=()
md5sums=('SKIP')

pkgver() {
	cd "$srcdir/${pkgname%-git}"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
	cd "$srcdir/${pkgname%-git}/src"
	make
}

package() {
	cd "$srcdir/${pkgname%-git}/src"
	make DESTDIR="$pkgdir/" install
}

it's been a while since I created a new PKGBUILD from scratch and the spec seems to have been updated so hopefully someone here will look at it and catch any issues. It builds fine on my end but who knows ...

Thanks in advance!

Last edited by Batou (2019-02-27 00:22:48)


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#2 2019-02-26 06:17:14

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] New PKGBUILD review request

Remove the empty arrays, and your parameter expansion could be simplified: "${pkgname%-*}"

Did you build it in a clean chroot?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2019-02-26 16:12:18

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [Solved] New PKGBUILD review request

The upstream repository has tags, so you should use one of the first two pkgver() functions described at https://wiki.archlinux.org/index.php/VC … elines#Git

Since the upstream repository specifies that only ffmpeg and gd are required to build (and includes instructions for Arch Linux to that effect) I suspect it will probably work in a clean chroot. smile

Looking at the Makefile, it seems like they forcibly gzip the manpage -- please submit an upstream issue or PR to *not* do that, as distro packagers have their own methods of doing so already (and not all distros use gzip) and this breaks reproducible builds due to https://reproducible-builds.org/docs/source-date-epoch/

Also, the gzip command they use does not invoke --keep and thus deletes the mtn.1 source in the process of creating mtn.1.gz

(Arch Linux will already compress the man page for you, if it is not yet compressed.)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#4 2019-02-26 23:44:27

Batou
Member
Registered: 2017-01-03
Posts: 259

Re: [Solved] New PKGBUILD review request

Thanks jasonwryan. Yes, I build everything in chroot.

Thanks so much Eli! I've made the pkgver changes and the package is now up. I've also made a patch to fix the Makefile and man page compression and created a merge request to the maintainer. Hopefully that gets merged soon.

https://aur.archlinux.org/packages/mtn-git


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

Board footer

Powered by FluxBB