You are not logged in.

#1 2008-04-08 21:35:30

TheAmigo
Member
Registered: 2008-04-08
Posts: 68

what dir to use for including sample config files in a pkg?

I've been using Arch for a few years, but I'm new to ABS.

There are two packages that I have to build from source, so I thought I'd contribute to AUR.  I've read many pages in the wiki and got to the point that my PKGBUILD file works.

The package I'm building (xtdesktop) needs per-user config files.  There are samples included in the source, and a README.  What's the proper way to include those in a pkg?

Offline

#2 2008-04-08 22:12:07

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: what dir to use for including sample config files in a pkg?

Put at the end of the pkgbuild e.g.:

  # Docs
  install -d $startdir/pkg/usr/share/doc/$pkgname/
  install -m644 -t $startdir/pkg/usr/share/doc/$pkgname/ AUTHORS ChangeLog nzbget.conf.example README || return 1

And don't forget docs rather than !docs in the OPTIONS line in /etc/makepkg.conf wink

Last edited by brebs (2008-04-08 22:14:46)

Offline

#3 2008-04-09 03:26:14

TheAmigo
Member
Registered: 2008-04-08
Posts: 68

Re: what dir to use for including sample config files in a pkg?

Thanks for the pointers, especially the makepkg.conf OPTIONS... that would've been hard to find.
I just submitted it.

Even though I don't expect too many people to use it, I've found it to fit my needs perfectly when nothing else would.

Offline

#4 2008-04-10 16:00:46

escondida
Package Maintainer (PM)
Registered: 2008-04-03
Posts: 157

Re: what dir to use for including sample config files in a pkg?

Not to be a stickler for the rules, but according to http://wiki.archlinux.org/index.php/Arc … _Standards, /usr/share/doc should be avoided. If the files really are essential, consider using /usr/share/<pkgname>/ instead...

Offline

#5 2008-04-10 16:24:59

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: what dir to use for including sample config files in a pkg?

Such files are *not* essential. They are documentation.

A (safe) configuration file in e.g. /etc/ should be installed by the package, if such a file is essential.

Arch's policy regarding documentation is very non-standard and annoying I'm afraid sad  Means that people should use the web to get docs, rather than look in /usr/share/doc/$pkgname as with other, saner distros.

Last edited by brebs (2008-04-10 16:28:32)

Offline

#6 2008-04-11 04:54:08

dolby
Member
From: 1992
Registered: 2006-08-08
Posts: 1,581

Re: what dir to use for including sample config files in a pkg?

/usr/share/$pkgname


There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums.  That is why we avoid it. -- ewaller (arch linux forum moderator)

Offline

#7 2008-04-12 03:00:39

TheAmigo
Member
Registered: 2008-04-08
Posts: 68

Re: what dir to use for including sample config files in a pkg?

Sorry if this is an obvious question, but I just want to make sure I understand...

Even though the PKGBUILD that I included says to put the readme and examples (last 3 lines of build() ) in /usr/share/doc/$pkgname, a user running makepkg with the default options will get a .pkg.tar.gz without them?  Only someone who's configured makepkg to include docs will get the package built with docs?

Offline

#8 2008-04-12 03:15:38

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: what dir to use for including sample config files in a pkg?

Yeah. Annoying, isn't it?

Offline

Board footer

Powered by FluxBB