You are not logged in.

#1 2013-08-29 19:04:17

Steef435
Member
From: age
Registered: 2013-08-29
Posts: 384
Website

[Solved]Unzip as makedepends and multiple licenses

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

#2 2013-08-29 20:24:51

progandy
Member
Registered: 2012-05-17
Posts: 2,151

Re: [Solved]Unzip as makedepends and multiple licenses

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"

Offline

#3 2013-08-29 20:51:48

Steef435
Member
From: age
Registered: 2013-08-29
Posts: 384
Website

Re: [Solved]Unzip as makedepends and multiple licenses

That looks nice. Thanks!

Offline

#4 2013-08-29 21:04:50

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,728
Website

Re: [Solved]Unzip as makedepends and multiple licenses

  1. bsdtar is able to extract zip archives so you do not need unzip.

  2. 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.

  3. 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.

Offline

#5 2013-08-29 21:42:25

Steef435
Member
From: age
Registered: 2013-08-29
Posts: 384
Website

Re: [Solved]Unzip as makedepends and multiple licenses

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

#6 2013-08-29 21:47:41

HalosGhost
Member
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 1,486
Website

Re: [Solved]Unzip as makedepends and multiple licenses

Steef435 wrote:

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


"All errors are ᴘᴇʙᴋᴀᴄ errors—It's just a matter of narrowing down which keyboard and chair." -Trilby
\ldots

Offline

#7 2013-08-29 22:39:23

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,728
Website

Re: [Solved]Unzip as makedepends and multiple licenses

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.


HalosGhost wrote:
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

Offline

#8 2013-08-29 23:09:43

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 10,437
Website

Re: [Solved]Unzip as makedepends and multiple licenses

3.  It is the AUR, so do whatever you want.

Offline

#9 2013-08-29 23:37:41

progandy
Member
Registered: 2012-05-17
Posts: 2,151

Re: [Solved]Unzip as makedepends and multiple licenses

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

Offline

#10 2013-08-30 00:06:03

HalosGhost
Member
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 1,486
Website

Re: [Solved]Unzip as makedepends and multiple licenses

Xyne wrote:

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


"All errors are ᴘᴇʙᴋᴀᴄ errors—It's just a matter of narrowing down which keyboard and chair." -Trilby
\ldots

Offline

#11 2013-08-30 10:42:02

Steef435
Member
From: age
Registered: 2013-08-29
Posts: 384
Website

Re: [Solved]Unzip as makedepends and multiple licenses

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

Board footer

Powered by FluxBB