You are not logged in.

#1 2019-02-03 20:42:20

KOTIK
Member
Registered: 2014-05-22
Posts: 1

PKGBUILD request for havoc

I created pkgbuild and want to add it to AUR

# Maintainer: Peter Kabin <peterkabin@gmail.com>
pkgname=havoc-git
pkgver=r8.2f2b38e
pkgrel=1
pkgdesc="terminal emulator for wayland based on libtsm"
arch=('i686' 'x86_64' 'ARM')
url="https://github.com/ii8/havoc"
license=('MIT')
depends=('libtsm-patched-git' 'glibc' 'libxkbcommon' 'wayland')
makedepends=('git' 'gcc')
provides=("havoc-git")
source=('git+git://github.com/ii8/havoc')
md5sums=('SKIP')


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

build() {
	cd "$srcdir/havoc"
	make
}

package() {
	cd "$srcdir/havoc"
	mkdir "$pkgdir/usr/"
	mkdir "$pkgdir/usr/bin/"
	mkdir "$pkgdir/etc"
	mkdir "$pkgdir/etc/havoc"
	cp "$srcdir/havoc/havoc" "$pkgdir/usr/bin/"
	cp "$srcdir/havoc/havoc.cfg" "$pkgdir/etc/havoc"
}

Last edited by KOTIK (2019-02-03 20:43:12)

Offline

#2 2019-02-03 21:12:08

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: PKGBUILD request for havoc

Doesn't look too bad.

  • Having gcc in makedepends is redundant, it's part of the base-devel group which is assumed to be installed when building packages.

  • Your entire package function can be replaced by2 lines. Read man install.

  • You aren't including the license correctly. Please read this.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2019-02-03 21:20:05

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: PKGBUILD request for havoc

Welcome to the arch linux forums KOTIK.

makedepends=('git' 'gcc')

gcc is in the base-devel group which is expected to always be installed before makepkg is executed.

provides=("havoc-git")

Packages always provide themselves making this line redundant.

license=('MIT')

See PKGBUILD#license

	mkdir "$pkgdir/usr/"
	mkdir "$pkgdir/usr/bin/"
	mkdir "$pkgdir/etc"
	mkdir "$pkgdir/etc/havoc"

I would suggest using a single install invocation to perform this action similarly I would replace the cp lines below that block with the use of install.

From the upstream Makefile

LDFLAGS=-lrt -lm -lutil -lwayland-client -ltsm -lxkbcommon

This overwrites the LDFLAGS makepkg set which prevents FULL RELRO.
One possible workaround.

make LDFLAGS="$LDFLAGS -lrt -lm -lutil -lwayland-client -ltsm -lxkbcommon"

Offline

Board footer

Powered by FluxBB