You are not logged in.

#1 2009-05-10 13:45:49

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

PKGBUILD mkdir question - (my frist real PKGBUILD)

I'm trying to write a PKGBUILD that will simply copy some jpg files to the /usr/share/pixmaps/backgrounds/cosmos dir.  Here is my first stab at it but what I'm not understanding is the correct way to make the $pkgdir/usr/share/pixmaps/backgrounds/cosmos directory.

Do I literally need a 'mkdir' line for each of the directories i.e. one for /usr, then one for /usr/share, then one of /usr/share/pixmaps, etc. of is there an easier way?

pkgname=cosmos-extras
pkgver=1.0
pkgrel=1
pkgdesc="The archive contains 13 astronomical images. The focus is primarily images within this solar sy$
arch=('i686' 'x86_64')
url="http://www.gnome-look.org/content/show.php/Cosmos+Screensaver%3A+extra+images?content=103282"
license=("custom")
depends=('gnome-screensaver')
source=(http://www.gnome-look.org/CONTENT/content-files/103282-${pkgname}.tar.gz)
md5sums=('7a166821777ac8d9857a37ab41244918')

build() {
 cd $srcdir/$pkgname
 mkdir $pkgdir/usr/
 install -D -m644 README.txt $pkgdir/usr/share/pixmaps/backgrounds/cosmos/
 install -D -m644 *.jpg $pkgdir/usr/share/pixmaps/backgrounds/cosmos/
}

Last edited by graysky (2009-05-10 13:46:06)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2009-05-10 13:47:15

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: PKGBUILD mkdir question - (my frist real PKGBUILD)

There is an easier way:

mkdir -p /usr/share/pixmaps/backgrounds/cosmos

This creates parent directories as necessary.

Offline

#3 2009-05-10 13:55:16

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,404
Website

Re: PKGBUILD mkdir question - (my frist real PKGBUILD)

Or even better

install -dm755 /usr/share/pixmaps/backgrounds/cosmos

Offline

#4 2009-05-10 14:04:19

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: PKGBUILD mkdir question - (my frist real PKGBUILD)

Cool, this is what I have now.  Do you guys see anything wrong w/ it before I u/l it to the AUR?

# Maintainer: Graysky <da_audiophile at yahoo dot com>
pkgname=cosmos-extras
pkgver=1.0
pkgrel=1
pkgdesc="The archive contains 13 astronomical images. The focus is primarily images within this solar system."
arch=('i686' 'x86_64')
url="http://www.gnome-look.org/content/show.php/Cosmos+Screensaver%3A+extra+images?content=103282"
license=("custom")
depends=('gnome-screensaver')
source=(http://www.gnome-look.org/CONTENT/content-files/103282-${pkgname}.tar.gz)
md5sums=('7a166821777ac8d9857a37ab41244918')

build() {
 cd $srcdir/$pkgname
 install -dm644 $pkgdir/usr/share/pixmaps/backgrounds/cosmos
 install -m644 README.txt $pkgdir/usr/share/pixmaps/backgrounds/cosmos
 install -m644 *.jpg $pkgdir/usr/share/pixmaps/backgrounds/cosmos/
}

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2009-05-10 14:52:50

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: PKGBUILD mkdir question - (my frist real PKGBUILD)

A bit shorter:

build() {
 cd $srcdir/$pkgname
 install -Dm644 README.txt $pkgdir/usr/share/pixmaps/backgrounds/cosmos/README.txt
 install -m644 *.jpg $pkgdir/usr/share/pixmaps/backgrounds/cosmos/
}

But if the license really does not fit into one of the common licenses (do a "ls -l /usr/share/licenses/common" to get a list), you must add a license file.

Offline

#6 2009-05-10 16:20:58

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: PKGBUILD mkdir question - (my frist real PKGBUILD)

@Stefan - thanks for the modification.  The contents of the package are literally public domain jpg files.  It's not clear to me which of the licenses would cover them..?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2009-05-10 18:52:58

thoffmeyer
Member
From: Chi
Registered: 2006-07-27
Posts: 91

Re: PKGBUILD mkdir question - (my frist real PKGBUILD)

graysky wrote:

@Stefan - thanks for the modification.  The contents of the package are literally public domain jpg files.  It's not clear to me which of the licenses would cover them..?

WTFPLv2

Offline

Board footer

Powered by FluxBB