[SOLVED] SLKBUILD + symlink

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
User avatar
zAchAry
Posts: 804
Joined: 11. May 2010, 09:02
Location: Israel

[SOLVED] SLKBUILD + symlink

Post by zAchAry »

I'm trying to add symlinks.

This is the script:

Code: Select all

pkgname=libhdate
libname=libhdate
pkgver=1.6.02
libver=1.0.6
pkgrel=1zy
source=("http://downloads.sourceforge.net/project/$libname/$libname/$libname-$pkgver/$libname-$pkgver.tar.bz2")
url="http://libhdate.sourceforge.net/"
docs=('AUTHORS' 'ChangeLog' 'COPYING' 'INSTALL' 'NEWS' 'README' 'USE')

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"$pkgname (C,C++ library for Hebrew calendar and dates.)"
"LibHdate is a small C,C++ library for Hebrew calendar and dates, "
"holidays, and reading sequence."
)

build() {
        cd $startdir/src/${pkgname}-${pkgver}
        ./configure \
          --prefix=/usr \
          --disable-fpc \
          --disable-gpc \
          --disable-perl \
          --disable-php \
          --disable-python \
          --disable-ruby \
          --build=$arch-slackware-linux
        make || return 1
        make DESTDIR=$startdir/pkg/ install || return 1
        (
         cd $startdir/pkg/usr/lib/
         rm -rf libhdate.so
         ln -sf libhdate.so.1.0.6 libhdate.so
         rm -rf libhdate.so.1
         ln -sf libhdate.so.1.0.6 libhdate.so.1
        )
}
From build log:

Code: Select all

Slackware package maker, version 3.141593.

Searching for symbolic links:
usr/lib/libhdate.so	libhdate.so.1.0.6
usr/lib/libhdate.so.1	libhdate.so.1.0.6

Making symbolic link creation script:
( cd usr/lib ; rm -rf libhdate.so )
( cd usr/lib ; ln -sf libhdate.so.1.0.6 libhdate.so )
( cd usr/lib ; rm -rf libhdate.so.1 )
( cd usr/lib ; ln -sf libhdate.so.1.0.6 libhdate.so.1 )

It is recommended that you make these lines your new installation script.

Would you like to make this stuff the install script for this package
and remove the symbolic links ([y]es, [n]o)? y


Removing symbolic links:
removed './usr/lib/libhdate.so'
removed './usr/lib/libhdate.so.1'

Creating your new ./install/doinst.sh...
This is the problem:

Code: Select all

$ hcal 
hcal: error while loading shared libraries: libhdate.so.1: cannot open shared object file: No such file or directory

$ hdate 
hdate: error while loading shared libraries: libhdate.so.1: cannot open shared object file: No such file or directory
Last edited by zAchAry on 26. Nov 2017, 21:06, edited 1 time in total.
Image
Help to make Slackware easier Donate to Salix
User avatar
ibka
Posts: 158
Joined: 12. Sep 2010, 13:14
Location: Sweden
Contact:

Re: [SLKBUILD] symlink

Post by ibka »

just add
--libdir=/usr/lib${LIBDIRSUFFIX} \
and remove
(
cd $startdir/pkg/usr/lib/
rm -rf libhdate.so
ln -sf libhdate.so.1.0.6 libhdate.so
rm -rf libhdate.so.1
ln -sf libhdate.so.1.0.6 libhdate.so.1
)
so it looks like this:

Code: Select all

pkgname=libhdate
libname=libhdate
pkgver=1.6.02
libver=1.0.6
pkgrel=1zy
source=("http://downloads.sourceforge.net/project/$libname/$libname/$libname-$pkgver/$libname-$pkgver.tar.bz2")
url="http://libhdate.sourceforge.net/"
docs=('AUTHORS' 'ChangeLog' 'COPYING' 'INSTALL' 'NEWS' 'README' 'USE')

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"$pkgname (C,C++ library for Hebrew calendar and dates.)"
"LibHdate is a small C,C++ library for Hebrew calendar and dates, "
"holidays, and reading sequence."
)

build() {
        cd $startdir/src/${pkgname}-${pkgver}
        ./configure \
          --prefix=/usr \
          --disable-fpc \
          --disable-gpc \
          --disable-perl \
          --disable-php \
          --disable-python \
          --disable-ruby \
          --libdir=/usr/lib${LIBDIRSUFFIX} \
          --build=$arch-slackware-linux
        make || return 1
        make DESTDIR=$startdir/pkg/ install || return 1
}
Image
User avatar
zAchAry
Posts: 804
Joined: 11. May 2010, 09:02
Location: Israel

Re: [SLKBUILD] symlink

Post by zAchAry »

It works. Thank you!
Image
Help to make Slackware easier Donate to Salix
Post Reply