This package has several issues that need to be corrected:
-
pkgbase ≠ pkgname. This blocks use of pkgbase
berry
from being used for a normalberry
package. Solution: Convert this into a normal package. Create the-git
package with the proper pkgbase/pkgname. -
-git
packages should have apkgver
function that uses git tag and commit info to build the version string, like0.1.12.r2.gc665902-1
. - Missing
git
inmadedepends
, required to build in clean chroot. - Missing provides/conflicts. So
-git
package can work as drop-in replacement for non-git package. - Unusual build/package organization.
- Missing LICENSE file.
The following PKGBUILD will resolve the above issues for this package. It can be converted into a -git
package by appending -git
to pkgname
. Test built in clean chroot, but I don't know how to use this program, so didn't do any further testing.
_pkgname="berry"
pkgname="$_pkgname"
pkgver=0.1.12
pkgrel=1
pkgdesc="A healthy, bite-sized window manager written over the XLib Library"
url="https://github.com/JLErvin/berry"
arch=('x86_64')
license=('MIT')
depends=(
'libx11'
'libxft'
'libxinerama'
)
makedepends=(
'gcc'
'make'
)
source=(berry.desktop)
sha256sums=('e1801d7429f8b0c213cb2026ab56ad3e313dcde033a3db176a94b0ef3daa75a6')
if [ x"$pkgname" == x"$_pkgname" ] ; then
# normal package
_pkgsrc="$_pkgname-$pkgver"
source+=("$_pkgname-$pkgver.tar.gz"::"$url/archive/refs/tags/$pkgver.tar.gz")
sha256sums+=('d5a5099f90f0bea3fa93ead72b1f4fe8205fe0540743a8cf23f5a0c9971b4cf1')
else
# git package
_pkgsrc="$_pkgname"
makedepends+=('git')
provides+=("$_pkgname")
conflicts+=("$_pkgname")
source+=("$_pkgname"::"git+$url")
sha256sums+=('SKIP')
pkgver() {
cd "$srcdir/$_pkgsrc"
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
fi
build() {
cd "$srcdir/$_pkgsrc"
# These variables are used in the Makefile to create the file directories.
PREFIX="/usr/local/"
EXAMPLEPREFIX="/etc/xdg/berry/"
# Set the variables and install the files.
./configure --prefix=/usr
# Compile the window manager
make
}
package() {
cd "$srcdir/$_pkgsrc"
make DESTDIR="$pkgdir" install
# Install the examples (sample configuration files)
install -vDm0644 -t "$pkgdir/etc/xdg/berry" \
examples/*
# Install LICENSE
install -vDm0644 "LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname"
# Install berry.desktop
install -vDm0644 "$srcdir/berry.desktop" -t "$pkgdir/usr/share/applications"
}
Pinned Comments
FlashDaggerX commented on 2018-08-24 23:22 (UTC)
FYI: This isn't my OC. Credits go to JLErvin for this wonderful little Window Manager.