You are not logged in.

#1 2021-04-04 18:13:54

scarydoors
Member
Registered: 2021-04-04
Posts: 2

Not sure whether my package would be eligible for the AUR

I just made a PKGBUILD for the UW ttyp0 font that I had a problem with. I installed an existing package for it from the AUR called otb-uw_ttyp0 and the font worked perfectly fine apart from when I tried to use it on Emacs. On Emacs I discovered that it doesn't support bitmap fonts that are presented as a single file if you know what I mean. So I created a package which had individual font files for each weight and each pixel size in the font which actually solved my problem with Emacs. Basically, I want to know if i can publish this package on the AUR given that there already is a package on the AUR which doesn't work for my specific use case using Emacs, my package has more merit over the existing package where it builds it from source unlike the other one pulling some files from a Github repository.

Here is my PKGBUILD:

# Maintainer: Alan Strauhs <scarydoorsyeah@gmail.com>

_dotted_zero=false
_centered_tilde=true
_encodings='uni i15'

pkgname='uw-ttyp0-otb'
pkgver=1.3
pkgrel=1
pkgdesc='Monospaced bitmap font with unicode support and powerline symbols.'
arch=('any')
url='http://people.mpi-inf.mpg.de/~uwe/misc/uw-ttyp0'
license=('custom:TTYP0')
makedepends=('fonttosfnt' 'perl')
conflicts=('otb-uw_ttyp0' 'uw-ttyp0-font')
source=("${url}/uw-ttyp0-${pkgver}.tar.gz")
md5sums=("7c25f8488ac7738c07f9e3e312843314")

prepare() {
	cd "uw-ttyp0-${pkgver}"
	if [[ -f ${SRCDEST}/VARIANTS.dat ]] ; then
		cp "${SRCDEST}/VARIANTS.dat" .
	else
		if ${_dotted_zero} ; then
			echo 'COPYTO Digit0Dotted Digit0'
		else
			echo 'COPYTO Digit0Slashed Digit0'
		fi >> VARIANTS.dat

		if ${_centered_tilde} ; then
			echo 'COPYTO MTilde AccTildeAscii'
		fi >> VARIANTS.dat
	fi

	if [[ -f ${SRCDEST}/TARGETS.dat ]] ; then
		cp "${SRCDEST}/TARGETS.dat" .
	else
		if [[ -n ${_encodings} ]] ; then
			echo "ENCODINGS = ${_encodings}"
		fi >> TARGETS.dat
	fi
}

build() {
    	cd "uw-ttyp0-${pkgver}"
	./configure
	make bdf
	
	mkdir -p otb
	for f in genbdf/*.bdf ; do
	    f=${f##*/}
	    fonttosfnt -o "otb/uw-ttyp0-${pkgver}-${f/bdf/otb}" "genbdf/${f}"
	done
}

package() {
	cd "uw-ttyp0-${pkgver}"

	install -d "$pkgdir/usr/share/fonts/misc"

	install -m644 otb/*.otb "${pkgdir}/usr/share/fonts/misc/"
	install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

Offline

#2 2021-04-04 18:58:21

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: Not sure whether my package would be eligible for the AUR

I do use $SRCDEST but don't like seeing it used in PKGBUILDs .
In my opinion SRCDEST content should be accurate copies of upstream files that PKGBUILDs are not allowed to touch except for reading .

Changes should be made to the local copies under $srcdir.

Your source is a tarball provided by upstream .
Normally those are static and you know what is in it.
Why are you testing for the existence of VARIANTS.DAT and TARGETS.DAT ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


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

Offline

#3 2021-04-04 19:04:14

scarydoors
Member
Registered: 2021-04-04
Posts: 2

Re: Not sure whether my package would be eligible for the AUR

Lone_Wolf wrote:

I do use $SRCDEST but don't like seeing it used in PKGBUILDs .
In my opinion SRCDEST content should be accurate copies of upstream files that PKGBUILDs are not allowed to touch except for reading .

Changes should be made to the local copies under $srcdir.

Your source is a tarball provided by upstream .
Normally those are static and you know what is in it.
Why are you testing for the existence of VARIANTS.DAT and TARGETS.DAT ?

In case the user provides their own because the font has multiple options for styles and stuff... I based some parts of this PKGBUILD on another AUR package because this is my first making one, however that package doesn't provide .otb fonts which work for latest versions of pango and instead just uses .pcf

Offline

Board footer

Powered by FluxBB