You are not logged in.
I'm building vacation for Arch64 but should be the same for 32bit. PKGBUILD looks like this:
# $Id: PKGBUILD,v 1.1 2004/01/21 15:43:15 dale Exp $
# Maintainer: dale <dale@archlinux.org>
pkgname=vacation
pkgver=1.2.6.1
pkgrel=1
pkgdesc="an automatic mail-answering program"
depends=(gdbm)
url="http://www.tosn.org/projects/vacation/"
source=(http://www.tosn.org/projects/vacation/files/$pkgname-$pkgver.tar.gz vacation.patch)
build() {
cd $startdir/src/$pkgname
mkdir -p $startdir/pkg/usr/{bin,man/man1}
# keeps binary from building
rm -rf vacation
# fixing the Makefile - not only for arch64
sed -i -e 's: -m486::; s:CFLAGS.*= (.*):CFLAGS += 1:' $startdir/src/$pkgname/Makefile
sed -i -e "s:/usr/bin:$startdir/pkg/usr/bin:g" $startdir/src/$pkgname/Makefile
mv vacation.man vacation.1
make install
}
These file have been created:
[andyrtr@workstation64 vacation]$ ls -lRA pkg/
pkg/:
insgesamt 0
drwxr-xr-x 4 andyrtr users 96 2006-01-28 09:32 usr
pkg/usr:
insgesamt 0
drwxr-xr-x 2 andyrtr users 96 2006-01-28 09:32 bin
drwxr-xr-x 3 andyrtr users 72 2006-01-28 09:32 man
pkg/usr/bin:
insgesamt 24
-rwxr-xr-x 1 andyrtr users 16864 2006-01-28 09:32 vacation
-rw------- 1 andyrtr users 470 2006-01-28 09:32 vaclook
pkg/usr/man:
insgesamt 0
drwxr-xr-x 2 andyrtr users 48 2006-01-28 09:32 man1
pkg/usr/man/man1:
insgesamt 0
[andyrtr@workstation64 vacation]$
I get this error:
==> Starting build()...
gcc -march=x86-64 -O2 -pipe -Wall -Xlinker -warn-common -D_PATH_VACATION="/var/abs/extra/system/vacation/pkg/usr/bin/vacation" -o vacation vacation.c -lgdbm
install -s -m 755 vacation /var/abs/extra/system/vacation/pkg/usr/bin/vacation
install -s -m 755 vaclook /var/abs/extra/system/vacation/pkg/usr/bin/vaclook
strip: /var/abs/extra/system/vacation/pkg/usr/bin/vaclook: File format not recognized
install: strip fehlgeschlagen
make: *** [install] Fehler 1
==> ERROR: Build Failed. Aborting...
Krusader detects it as a Perl program. Any idea?
AndyRTR
Offline
Posted: Sat Jan 28, 2006 8:45 am Post subject: How to prevent a file from stripping?
--------------------------------------------------------------------------------
I'm building vacation for Arch64 but should be the same for 32bit. PKGBUILD looks like this:
Code:
# $Id: PKGBUILD,v 1.1 2004/01/21 15:43:15 dale Exp $
# Maintainer: dale <dale@archlinux.org>
pkgname=vacation
pkgver=1.2.6.1
pkgrel=1
pkgdesc="an automatic mail-answering program"
depends=(gdbm)
url="http://www.tosn.org/projects/vacation/"
source=(http://www.tosn.org/projects/vacation/files/$pkgname-$pkgver.tar.gz vacation.patch)
build() {
cd $startdir/src/$pkgname
mkdir -p $startdir/pkg/usr/{bin,man/man1}
# keeps binary from building
rm -rf vacation
# fixing the Makefile - not only for arch64
sed -i -e 's: -m486::; s:CFLAGS.*= (.*):CFLAGS += 1:' $startdir/src/$pkgname/Makefile
sed -i -e "s:/usr/bin:$startdir/pkg/usr/bin:g" $startdir/src/$pkgname/Makefile
mv vacation.man vacation.1
make install
}
These file have been created:
Code:
[andyrtr@workstation64 vacation]$ ls -lRA pkg/
pkg/:
insgesamt 0
drwxr-xr-x 4 andyrtr users 96 2006-01-28 09:32 usr
pkg/usr:
insgesamt 0
drwxr-xr-x 2 andyrtr users 96 2006-01-28 09:32 bin
drwxr-xr-x 3 andyrtr users 72 2006-01-28 09:32 man
pkg/usr/bin:
insgesamt 24
-rwxr-xr-x 1 andyrtr users 16864 2006-01-28 09:32 vacation
-rw------- 1 andyrtr users 470 2006-01-28 09:32 vaclook
pkg/usr/man:
insgesamt 0
drwxr-xr-x 2 andyrtr users 48 2006-01-28 09:32 man1
pkg/usr/man/man1:
insgesamt 0
[andyrtr@workstation64 vacation]$
I get this error:
==> Starting build()...
gcc -march=x86-64 -O2 -pipe -Wall -Xlinker -warn-common -D_PATH_VACATION="/var/abs/extra/system/vacation/pkg/usr/bin/vacation" -o vacation vacation.c -lgdbm
install -s -m 755 vacation /var/abs/extra/system/vacation/pkg/usr/bin/vacation
install -s -m 755 vaclook /var/abs/extra/system/vacation/pkg/usr/bin/vaclook
strip: /var/abs/extra/system/vacation/pkg/usr/bin/vaclook: File format not recognized
install: strip fehlgeschlagen
make: *** [install] Fehler 1
==> ERROR: Build Failed. Aborting...
Looks like its tring to install to /var/abs/extra/system/vacation/pkg/usr/bin....... ????
try make DESTDIR=$startdir/pkg/usr install
Offline
No changes :-(
Offline
remove the sed line refering to usr/bin and try again
Offline
:-(
I don't think it's related to the make install process. All files are at the right place. Post install the stripping fails. Should be something different
Offline
'makepkg -n' prevents makepkg from stripping.
Offline
Ok. I think I've solved it. It's not related to makepkg. That's why makepkg -n won't help here. It's an issue inside the Makefile. But good to know there's such an option ;-)
Thank you
So when the Makefile is quiet unusable I've dicided to install the files by hand and it's loking like this:
# $Id: PKGBUILD,v 1.1 2004/01/21 15:43:15 dale Exp $
# Maintainer: dale <dale@archlinux.org>
pkgname=vacation
pkgver=1.2.6.1
pkgrel=1
pkgdesc="an automatic mail-answering program"
depends=(gdbm)
url="http://www.tosn.org/projects/vacation/"
source=(http://www.tosn.org/projects/vacation/files/$pkgname-$pkgver.tar.gz)
md5sums=('0c14379b8fa09bea1a6a264330c7bd11')
build() {
cd $startdir/src/$pkgname
mkdir -p $startdir/pkg/usr/{bin,man/man1}
make || return 1
install -s -m 755 vacation $startdir/pkg/usr/bin/vacation
install -m 755 vaclook $startdir/pkg/usr/bin/vaclook
install -m 444 vacation.man $startdir/pkg/usr/man/man1/vacation.1
install -m 444 vaclook.man $startdir/pkg/usr/man/man1/vaclook.1
}
Offline