You are not logged in.

#1 2004-08-09 15:51:28

slackhack
Member
Registered: 2004-06-30
Posts: 738

problem making package

i'm trying to make this little password manager program i like to use, but it keeps failing and i can't figure out what i'm doing wrong. as far as i can tell, everything is the same as other package builds i've seen. here's the pkgbuild:

pkgname=gpasman
pkgver=1.3.0
pkgrel=1
pkgdesc="a gtk personal password manager"
url="http://gpasman.sourceforge.net"
license=""
depends=()
makedepends=()
conflicts=()
replaces=()
backup=()
install=
source=(http://gpasman.sourceforge.net/files/gpasman-1.3.0.tar.gz)
md5sums=()

build() {
  cd $startdir/src/$pkgname-$pkgver
  ./configure --prefix=/usr
  make || return 1
  make prefix=$startdir/pkg/usr install
} 
[3] root:/var/abs/local/gpasman # makepkg
==> Making package: gpasman  (Mon Aug  9 11:46:25 EDT 2004)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
==>     Using local copy of gpasman-1.3.0.tar.gz
==> WARNING: MD5sums are missing or incomplete.  Cannot verify source integrity.
==> Extracting Sources...
==>     tar --use-compress-program=gzip -xf gpasman-1.3.0.tar.gz
==> Removing existing pkg/ directory...
==> Starting build()...
loading cache ./config.cache
checking for gcc... (cached) gcc
checking whether the C compiler (gcc -march=i686 -O2 -pipe ) works... yes
checking whether the C compiler (gcc -march=i686 -O2 -pipe ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for a BSD compatible install... (cached) /bin/install -c
checking for strip... (cached) /usr/bin/strip
checking for gtk-config... (cached) /usr/bin/gtk-config
checking whether byte ordering is bigendian... (cached) no
checking how to run the C preprocessor... (cached) gcc -E
checking for ANSI C header files... (cached) yes
checking for unistd.h... (cached) yes
checking for working const... (cached) yes
checking for mode_t... (cached) yes
creating ./config.status
creating Makefile
creating src/Makefile
creating src/config.h
src/config.h is unchanged
make[1]: Entering directory `/var/abs/local/gpasman/src/gpasman-1.3.0/src'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/var/abs/local/gpasman/src/gpasman-1.3.0/src'
make[1]: Entering directory `/var/abs/local/gpasman/src/gpasman-1.3.0/src'
/usr/bin/strip gpasman
/bin/install -c -s -m 755 ./gpasman /var/abs/local/gpasman/pkg/usr/bin/gpasman
/bin/install: cannot create regular file `/var/abs/local/gpasman/pkg/usr/bin/gpasman': No such file or directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/var/abs/local/gpasman/src/gpasman-1.3.0/src'
make: *** [install] Error 2
==> ERROR: Build Failed.  Aborting...

btw, the program compiles and installs fine if i do the ./configure make make install from my user directory.

any ideas?

Offline

#2 2004-08-09 16:50:15

Fox
Member
Registered: 2004-07-28
Posts: 124

Re: problem making package

slackhack wrote:

i'm trying to make this little password manager program i like to use, but it keeps failing and i can't figure out what i'm doing wrong. as far as i can tell, everything is the same as other package builds i've seen. here's the pkgbuild:

pkgname=gpasman
pkgver=1.3.0
pkgrel=1
pkgdesc="a gtk personal password manager"
url="http://gpasman.sourceforge.net"
license=""
depends=()
makedepends=()
conflicts=()
replaces=()
backup=()
install=
source=(http://gpasman.sourceforge.net/files/gpasman-1.3.0.tar.gz)
md5sums=()

build() {
  cd $startdir/src/$pkgname-$pkgver
  ./configure --prefix=/usr
  make || return 1
  make prefix=$startdir/pkg/usr install
} 
[3] root:/var/abs/local/gpasman # makepkg
==> Making package: gpasman  (Mon Aug  9 11:46:25 EDT 2004)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
==>     Using local copy of gpasman-1.3.0.tar.gz
==> WARNING: MD5sums are missing or incomplete.  Cannot verify source integrity.
==> Extracting Sources...
==>     tar --use-compress-program=gzip -xf gpasman-1.3.0.tar.gz
==> Removing existing pkg/ directory...
==> Starting build()...
loading cache ./config.cache
checking for gcc... (cached) gcc
checking whether the C compiler (gcc -march=i686 -O2 -pipe ) works... yes
checking whether the C compiler (gcc -march=i686 -O2 -pipe ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for a BSD compatible install... (cached) /bin/install -c
checking for strip... (cached) /usr/bin/strip
checking for gtk-config... (cached) /usr/bin/gtk-config
checking whether byte ordering is bigendian... (cached) no
checking how to run the C preprocessor... (cached) gcc -E
checking for ANSI C header files... (cached) yes
checking for unistd.h... (cached) yes
checking for working const... (cached) yes
checking for mode_t... (cached) yes
creating ./config.status
creating Makefile
creating src/Makefile
creating src/config.h
src/config.h is unchanged
make[1]: Entering directory `/var/abs/local/gpasman/src/gpasman-1.3.0/src'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/var/abs/local/gpasman/src/gpasman-1.3.0/src'
make[1]: Entering directory `/var/abs/local/gpasman/src/gpasman-1.3.0/src'
/usr/bin/strip gpasman
/bin/install -c -s -m 755 ./gpasman /var/abs/local/gpasman/pkg/usr/bin/gpasman
/bin/install: cannot create regular file `/var/abs/local/gpasman/pkg/usr/bin/gpasman': No such file or directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/var/abs/local/gpasman/src/gpasman-1.3.0/src'
make: *** [install] Error 2
==> ERROR: Build Failed.  Aborting...

btw, the program compiles and installs fine if i do the ./configure make make install from my user directory.

any ideas?

Have you tried to build it manual, without makepkg?

Offline

#3 2004-08-09 16:57:25

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: problem making package

It looks like you aren't making the $startdir/pkg/usr/bin directory, so the program doesn't know where to install. Try something like mkdir -p $startdir/pkg/usr/bin early in your build function. You may have to make other directories like /etc and /usr/share depending on which directories the program has to install to.

Dusty

Offline

#4 2004-08-09 17:17:17

slackhack
Member
Registered: 2004-06-30
Posts: 738

Re: problem making package

Dusty wrote:

It looks like you aren't making the $startdir/pkg/usr/bin directory, so the program doesn't know where to install. Try something like mkdir -p $startdir/pkg/usr/bin early in your build function.

it works! my first package. big_smile

i had tried making a $startdir/pkg/usr/bin directory manually before running the makepkg and that didn't work. i guess it needed to be in the script for some reason. aren't those directories usually made "automagically" though? they were for other programs i built, traffic, for example. :?:

anyway, the corrected PKGBUILD is:
[see below]

Offline

#5 2004-08-09 17:23:02

contrasutra
Member
From: New Jersey
Registered: 2003-07-26
Posts: 507

Re: problem making package

Be sure to figure out the DEPENDS for the package. For example, one would be GTK  roll . You can use "namcap" to detect it for you.

Try to use the variables when appropriate. For example, your SOURCE line could be:

source=(http://gpasman.sourceforge.net/files/$pkgname-$pkgver.tar.gz)

Also, add md5sums. Use "makepkg -g" for this.


"Contrary to popular belief, penguins are not the salvation of modern technology.  Neither do they throw parties for the urban proletariat."

Offline

#6 2004-08-09 18:29:43

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: problem making package

slackhack wrote:

i had tried making a $startdir/pkg/usr/bin directory manually before running the makepkg and that didn't work. i guess it needed to be in the script for some reason. aren't those directories usually made "automagically" though?

Yes, it needs to be in the script, as I believe makepkg deletes the pkg directory before building.

The only reason I can think of those dirs being made automatically would be if the install script makes them. I suppose some makefiles make them and some don't.

Dusty

Offline

#7 2004-08-09 21:36:55

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: problem making package

insert

mkdir -p $startdir/pkg/usr/bin/

before

make ... install

to create the $startdir/pkg/usr/bin/ ... the Makefile assumes, that it already exists, because normally, you would install into /usr/bin that exist by 100% :-) ... the author didn't had in mind to make it pkg-making compatible, but this is no trouble at all


The impossible missions are the only ones which succeed.

Offline

#8 2004-08-09 21:38:01

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: problem making package

... if you need an example, have a look here:

http://cvs.archlinux.org/cgi-bin/viewcv … cvs-markup

very simmilar to solve


The impossible missions are the only ones which succeed.

Offline

#9 2004-08-09 22:06:25

slackhack
Member
Registered: 2004-06-30
Posts: 738

Re: problem making package

contrasutra wrote:

Be sure to figure out the DEPENDS for the package. For example, one would be GTK  roll . You can use "namcap" to detect it for you.

Try to use the variables when appropriate. For example, your SOURCE line could be:

source=(http://gpasman.sourceforge.net/files/$pkgname-$pkgver.tar.gz)

Also, add md5sums. Use "makepkg -g" for this.

here you go -- hope you're happy. tongue j/k

i never knew about generating md5sums like that, thanks. i changed from using the variables in the filename b/c it wasn't working -- turns out it was from having the single quotes!

corrected PKGBUILD:

pkgname=gpasman
pkgver=1.3.0
pkgrel=1
pkgdesc="a gtk personal password manager"
url="http://gpasman.sourceforge.net"
license="GPL"
depends=('xorg' 'gtk' 'glibc')

source=(http://gpasman.sourceforge.net/files/$pkgname-$pkgver.tar.gz)
md5sums=(e50e9b93427cc610067f725d6160c45f)

build() {
  cd $startdir/src/$pkgname-$pkgver
  ./configure --prefix=/usr
  make || return 1
  mkdir -p $startdir/pkg/usr/bin  
  make prefix=$startdir/pkg/usr install
}

Offline

#10 2004-08-10 14:32:13

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: problem making package

About makepkg -g: you should reread makepkg manual - this kind of use is mentioned there. Another useful option (sometimes) is makepkg -o which only downloads and extracts sources - good for checking for new options in configure --help etc...

About installing and creating directories: usually using the install program is better than mkdir. Install is often used in most makefiles but sometimes you have to use it "manually" in a pkgbuild. In your case you can create a directory with install -d $startdir/pkg/usr/bin. Install has more options including permissions setting (-m option) so you can create directories and set permissions in one command - read install manual and other pkgbuilds for examples. But sometimes install is not enough :-)

BTW congratulations for your first package. Be careful it's addictive ;-)

Offline

#11 2004-08-10 15:03:57

slackhack
Member
Registered: 2004-06-30
Posts: 738

Re: problem making package

lanrat wrote:

BTW congratulations for your first package. Be careful it's addictive ;-)

i noticed. big_smile here's another one:

pkgname=xfsamba
pkgver=0.47
pkgrel=1
pkgdesc="a samba share browser"
url="http://linux.imp.mx/xfsamba/"
depends=('xorg' 'gdk-pixbuf' 'glibc')

source=(http://linux.imp.mx/xfsamba/archive/$pkgname-$pkgver.tar.gz)
md5sums=(b2383527e32ef8a28eec87aee899a300)

build() {
  cd $startdir/src/$pkgname-$pkgver
  ./configure --prefix=/usr
  make || return 1
  make prefix=$startdir/pkg/usr install
}

p.s. am i supposed to "submit" these somewhere in case someone else wants to use them?

Offline

#12 2004-08-10 16:00:15

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: problem making package

slackhack wrote:

p.s. am i supposed to "submit" these somewhere in case someone else wants to use them?

You can upload the packages or the PKGBUILDs to ftp.archlinux.org/incoming.

Eric is working on a PKGBUILD submittal system.

Dusty

Offline

#13 2004-08-10 16:52:32

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: problem making package

hmmm... i thought i had posted to this thread yesterday.

Anyway, alot of times if the pkg is not installing to the /pkg dir then sometimes it is trying to install directly to the system and not the package and other times instead of making the dir you need to use DESTDIR instead of prefix like so:

make DESTDIR=$startdir/pkg install


AKA uknowme

I am not your friend

Offline

Board footer

Powered by FluxBB