You are not logged in.
Hello,
I'm creating a package for the Entypo font. I was hoping someone could help me with some doubts I have.
1. The source file is a zip archive. Does that mean that I should add unzip as a makedepends? I see some packages do and some don't, so I'm not sure.
2. I included a license file in the package because the OFL license isn't in licenses.
cd $srcdir/../
Is this the right way to access the root directory of the package(where I put the license file)?
3. The font contains some logos like Github's and Facebook's. They have different license and/or trademarks. They also aren't included in the source file. Should they be included in the PKGBUILD?
Thanks for your time,
Steef
PKGBUILD(builds and installs fine)
pkgname=otf-entypo
pkgver=2.0
pkgrel=1
pkgdesc="A font set of 250+ carefully crafted pictograms."
arch=('any')
url="http://www.entypo.com"
license=('custom:OFL')
depends=('fontconfig' 'xorg-fonts-encodings' 'xorg-font-utils')
makedepends=('unzip')
install=entypo.install
source=("http://dl.dropbox.com/u/4339492/Entypo.zip")
package() {
mkdir -p "$pkgdir/usr/share/licenses/$pkgname/"
cd $srcdir/../
install -m644 license.txt "$pkgdir/usr/share/licenses/$pkgname/"
cd "$srcdir/Entypo/Desktop typeface/"
mkdir -p "$pkgdir"/usr/share/fonts/OTF
install -m644 *.otf "$pkgdir"/usr/share/fonts/OTF/
}
md5sums=("c8d3934d41066a470c444f3236133203")
entypo.install
post_install() {
echo -n "Updating font cache... "
fc-cache -f > /dev/null
mkfontscale /usr/share/fonts/OTF
mkfontdir /usr/share/fonts/OTF
echo "done."
}
post_upgrade() {
post_install $1
}
post_remove() {
post_install $1
}
EDIT: Entypo's website seems down at the moment. It didn't really contain any useful information but here's a page at openfontlibrary.org for reference.
Last edited by Steef435 (2013-08-30 11:16:08)
Offline
Is this the right way to access the root directory of the package(where I put the license file)?
No. You add "license.txt" to the source array, and use "$srcdir/license.txt"
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
That looks nice. Thanks!
Offline
bsdtar is able to extract zip archives so you do not need unzip.
Include it in the source array and use "$srcdir/license.txt" as suggested by progandy. The PKGBUILD functions should not try to access files outside of $srcdir.
I don't know. Someone more familiar with relevant laws will have to answer.
Other notes:
Change
mkdir -p "$pkgdir/usr/share/licenses/$pkgname/"
install -m644 license.txt "$pkgdir/usr/share/licenses/$pkgname/"
to
install -Dm644 license.txt "$pkgdir/usr/share/licenses/$pkgname/license.txt"
There's no reason to pass "$1" to post_install from post_upgrade and post_remove as it is not used in that function.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Thanks for your reply!
I changed everything mentioned, though I can't get install -D to work properly.
install -Dm644 $srcdir/license.txt "$pkgdir/usr/share/licenses/$pkgname/"
cd "$srcdir/Entypo/Desktop typeface/"
install -Dm644 *.otf "$pkgdir/usr/share/fonts/OTF/"
It gives me a "No such file or directory" error. From the manual of install:
-D create all leading components of DEST except the last, then copy SOURCE to DEST
Does this mean I should still create the last directory with mkdir, in this case "otf-entypo"?
This is the exact error:
install: target ‘/home/steef/[...]/otf-entypo/pkg/otf-entypo/usr/share/licenses/otf-entypo/’ is not a directory: No such file or directory’
I used a PKGBUILD as template and overlooked it, thanks for pointing that out!
Offline
Does this mean I should still create the last directory with mkdir, in this case "otf-entypo"?
No, don't use mkdir. I would recommend doing the following in this case:
install -D "$pkgdir/usr/share/fonts/OTF"
install -tm644 "$pkgdir/usr/share/fonts/OTF" *.otf
That should correctly create the directory with the correct attributes and permissions and then copy all the .otf files to that directory.
All the best,
-HG
Offline
Sorry, there was a mistake in my posted suggestion. It should have been
install -Dm644 license.txt "$pkgdir/usr/share/licenses/$pkgname/license.txt"
Note that this format only works for single files.
install -D "$pkgdir/usr/share/fonts/OTF" install -tm644 "$pkgdir/usr/share/fonts/OTF" *.otf
I think that should be
install -dm755 "$pkgdir/usr/share/fonts/OTF"
install -m644 -t "$pkgdir/usr/share/fonts/OTF" *.otf
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
3. It is the AUR, so do whatever you want.
Offline
3: I guess I would put the section "License How to use it" from the homepage as license.txt and maybe add the OFL in a separate OFL.txt and CC in CC-BY-SA.txt
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
that should be
install -dm755 "$pkgdir/usr/share/fonts/OTF" install -m644 -t "$pkgdir/usr/share/fonts/OTF" *.otf
Xyne, you are absolutely right, my apologies to the OP.
All the best,
-HG
Offline
Thanks a lot for all the responses,
@Xyne, HalosGhost Thanks, works like a charm now.
Regarding the license, I'll include the section from the website and the OFL as suggested by Progandy, thanks! I won't include the CC-BY-SA because it's in licenses, so I added it to the licenses array.
It all works great now, I'll upload it to the AUR. Thanks again for the help!
My final PKGBUILD:
# Mantainer: steef435 <steef435@hotmail.com>
pkgname=otf-entypo
pkgver=2.0
pkgrel=1
pkgdesc="A font set of 250+ carefully crafted pictograms."
arch=('any')
url="http://www.entypo.com"
license=('CCPL:by-sa'
'custom')
depends=('fontconfig' 'xorg-fonts-encodings' 'xorg-font-utils')
install=entypo.install
source=("http://dl.dropbox.com/u/4339492/Entypo.zip"
"license.txt"
"OFL.txt")
md5sums=("c8d3934d41066a470c444f3236133203"
"69e35cdba6c562199177104127137377"
"60aa5b02420a96f0fb1e19f8690e94f3")
package() {
install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
install -m644 -t "$pkgdir/usr/share/licenses/$pkgname" $srcdir/license.txt $srcdir/OFL.txt
install -dm755 "$pkgdir/usr/share/fonts/OTF"
cd "$srcdir/Entypo/Desktop typeface/"
install -m644 -t "$pkgdir/usr/share/fonts/OTF" *.otf
}
Offline