You are not logged in.

#1 2021-01-19 15:13:00

TheSheepGuy
Member
Registered: 2020-04-13
Posts: 47

PKGBUILD request: otf-edwin

I wanted to package MuseScore's new default font: Edwin. The main issue I'm having is that I'm not sure how to include the licence correctly. The repo's LICENSE.md doesn't include a copy of the OFL, so I took a copy of it from the SIL website, cutting out lines before the start of the licence. Is there a better way to do this? I have already requested that they include a copy of the licence using a GitHub issue.

# Maintainer:  Charlotte Ausel <TheSheepGuy1@gmail.com>

pkgname=otf-edwin
pkgver=0.5
pkgrel=1
pkgdesc="A text font for musical scores"
arch=('any')
url="https://github.com/MuseScoreFonts/Edwin"
license=('OFL')
source=('https://github.com/MuseScoreFonts/Edwin/archive/766b6d6e97f81fd8474d5538df271fe22f1e850c.tar.gz' 'https://scripts.sil.org/cms/scripts/render_download.php?format=file&media_id=OFL_plaintext&filename=license.txt')
sha256sums=('14b1122a20cabe59ce2373b5ff677fb74a3b1d0d21445449b4f5106bcc31ccdc' 'ca122f3bda0154f692817450168cb650a7fc59ef96c93582acd2e7a744d464d3')

package() {
	cd "$srcdir/Edwin-766b6d6e97f81fd8474d5538df271fe22f1e850c"
	install -dm755 "$pkgdir/usr/share/fonts/OTF"
	install -Dm644 Edwin*.otf "$pkgdir/usr/share/fonts/OTF"

	cd ..
	sed -i -e 1,11d "render_download.php?format=file&media_id=OFL_plaintext&filename=license.txt"
	install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
	install -Dm644 "render_download.php?format=file&media_id=OFL_plaintext&filename=license.txt" "$pkgdir/usr/share/licenses/$pkgname/license.txt"
}

Offline

#2 2021-01-20 02:14:54

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

Re: PKGBUILD request: otf-edwin

I recommend using "man 5 PKGBUILD"s described method of renaming files to slightly better names:

source=('https://github.com/MuseScoreFonts/Edwin/archive/766b6d6e97f81fd8474d5538df271fe22f1e850c.tar.gz'
        'LICENSE-OFL-1.1.txt::https://scripts.sil.org/cms/scripts/render_download.php?format=file&media_id=OFL_plaintext&filename=license.txt')

Then refer to it in future as LICENSE-OFL-1.1.txt

...

Do not use sed -i on the source file, do it on a copy instead. It's technically safe since the original won't be modified without sed --follow-symlinks, but still not very good practice. Worse is that if you run makepkg --repackage, it will keep on removing more lines from the source file (and the version in $SRCDEST will not be harmed, but the version in $srcdir will be repeatedly modified without refreshing it from $SRCDEST).

Best to either:

  • sed the installed copy in "$pkgdir"/usr/share/licenses/$pkgname/

  • sed without -i, and pipe it to

    install -Dm644 /dev/stdin "$pkgdir"/usr/share/licenses/$pkgname/license.txt

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

Offline

#3 2021-01-20 02:26:41

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: PKGBUILD request: otf-edwin

Should that sed work just be done in prepare(), then all the above notes on it become irrelevant.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2021-01-20 11:32:26

TheSheepGuy
Member
Registered: 2020-04-13
Posts: 47

Re: PKGBUILD request: otf-edwin

Thank you for the help from you two! Since then, the licence file has been updated so that there's no need to download the file separately and use sed and all that. I'll remember it for the future though! I have uploaded the package to the AUR now.

Last edited by TheSheepGuy (2021-01-20 11:32:44)

Offline

Board footer

Powered by FluxBB