void-linux / void-packages

The Void source packages collection
https://voidlinux.org
Other
2.57k stars 2.14k forks source link

How to set wrksrc with whitespace? #24477

Closed muni-corn closed 4 years ago

muni-corn commented 4 years ago

I've got a template in progress for this one, but with one major issue. I'm having a hard time copying the font files because the archive/distfiles have directories with spaces in them and I haven't found out yet how to circumvent this.

This is the directory structure of the zip file (from this release):

Directory structure of Inter zip file

We're supposed to copy the files from "Inter Desktop" into our font directories. I've tried a number of things to try and solve the whitespace-in-wrksrc problem, but no luck yet. What's the right way to go about this?

# Template file for 'font-inter'
pkgname=font-inter
version=3.15
revision=1
archs="noarch"
hostmakedepends=""
makedepends=""
depends="font-util"
short_desc="Typeface specially designed for user interfaces"
maintainer="Harrison Thorne <harrisonthorne@protonmail.com>"
license="OFL-1.1"
homepage="https://rsms.me/inter/"
distfiles="https://github.com/rsms/inter/releases/download/v${version}/Inter-${version}.zip"
checksum=1534288eb599f57acbf2c5ac0010da9495c2ee53116e08d799555c6f8ee22156
wrksrc="Inter Desktop"

font_dirs="/usr/share/fonts/Inter/"

do_install() {
    ls
    vmkdir usr/share/fonts/Inter
    vcopy * usr/share/fonts/Inter
    vlicense LICENSE # ??? added in with edit below
}

Edit: About the LICENSE file too, will wrksrc then have to be .? I'm confused about how all of this will work :P

flexibeast commented 4 years ago

Does this font provide glyphs that aren't otherwise provided by fonts in the repos? If not, this package is unlikely to be accepted, due to our quality requirements.

muni-corn commented 4 years ago

Fair enough, but how would I go about this anyways if I wanted to make my own local template?

Anachron commented 4 years ago

What's the issue when you try to build the package? If your template doesn't work then something in xbps-src is broken when quoting wrksrc.

ericonr commented 4 years ago

xbps-src really doesn't do a lot of quoting. Best course of action might be to mv "folder with spaces" folder-without-spaces in post_extract

Anachron commented 4 years ago

@ericonr found at least these places where quoting is wrong:

https://github.com/void-linux/void-packages/blob/e06efd6bbb32d9261c0e4b09c46adbe7b6de5873/common/hooks/do-extract/00-distfiles.sh#L10 https://github.com/void-linux/void-packages/blob/e06efd6bbb32d9261c0e4b09c46adbe7b6de5873/common/hooks/do-extract/00-distfiles.sh#L24

Edit: Here too

https://github.com/void-linux/void-packages/blob/a79ded1977a50f8eec4a150235142f9e030c9a13/common/xbps-src/shutils/common.sh#L33

The quoting in xbps-src is very randomly.

Chocimier commented 4 years ago

Works now with updated xbps-src.