LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   src2pkg (http://www.linuxquestions.org/questions/slackware-14/src2pkg-756133/)

karp 09-18-2009 04:25 AM

src2pkg
 
I have some problems:
Code:

root@mops:/home/karp# src2pkg -C -VV -W /home/karp/Distrib/seamonkey-1.1.18.en-US.linux-i686.tar.gzFound global src2pkg.conf - Reading /etc/src2pkg/src2pkg.conf                                     
Found source archive: seamonkey-1.1.18.en-US.linux-i686.tar.gz                                   
Removing existing package build directory from previous build -                                   
Removing existing source build directory from previous build -                                   
Creating working directories:                                                                     
  PKG_DIR=/tmp/seamonkey-1.1.18.en-pkg-1                                                         
  SRC_DIR=/tmp/seamonkey-1.1.18.en-src-1                                                         
Unpacking source archive -                                                                       
seamonkey/                                                                                     


seamonkey/libsmime3.so

Correcting source permissions - Done
Checking for patches - None found
Skipping configure_source -
Skipping compile_source -
FAILED!! No INSTALL_LINE given.
root@mops:/home/karp#

slackware

pixellany 09-18-2009 06:37 PM

Moved: This thread is more suitable in <Slackware> and has been moved accordingly to help your thread/question get the exposure it deserves.

Daedra 09-18-2009 07:23 PM

Quote:

Originally Posted by karp (Post 3688220)
I have some problems:
Code:

root@mops:/home/karp# src2pkg -C -VV -W /home/karp/Distrib/seamonkey-1.1.18.en-US.linux-i686.tar.gzFound global src2pkg.conf - Reading /etc/src2pkg/src2pkg.conf                                     
Found source archive: seamonkey-1.1.18.en-US.linux-i686.tar.gz                                   
Removing existing package build directory from previous build -                                   
Removing existing source build directory from previous build -                                   
Creating working directories:                                                                     
  PKG_DIR=/tmp/seamonkey-1.1.18.en-pkg-1                                                         
  SRC_DIR=/tmp/seamonkey-1.1.18.en-src-1                                                         
Unpacking source archive -                                                                       
seamonkey/                                                                                     


seamonkey/libsmime3.so

Correcting source permissions - Done
Checking for patches - None found
Skipping configure_source -
Skipping compile_source -
FAILED!! No INSTALL_LINE given.
root@mops:/home/karp#

slackware


Just curious is there a reason your building this yourself, because its already included in slackware, even the newest version ftp://elektroni.phys.tut.fi/slackwar...ches/packages/

Just download seamonkey-1.1.18-i486-1.txz the as root run
upgradepkg seamonkey-1.1.18-i486-1.txz
and your done.


Also src2pkg won't work with that version of seamonkey because its a redistributable binary not the source. src2pkg makes packages from source.

piete 09-18-2009 08:34 PM

Quote:

Also src2pkg won't work with that version of seamonkey because its a redistributable binary not the source. src2pkg makes packages from source.
Strictly speaking src2pkg makes packages (tgz / txz) from tarballs, it doesn't care much about what's in the tarball, but pkg2pkg sounds a bit wierd :D

Anyway, src2pkg will try to guess what you want done, and will do it's best to sort you out with an installable package, but sometimes it gets a bit confused and you have to give it some help.

In this case, after some pondering, I decided the best kind of help I could give it would be do write a new bit of script.

My version of a script, I'm sure Gilbert will chime in soon with an improved version:

seamonkey.src2pkg
Code:

#!/bin/bash
## src2pkg script for:        seamonkey-1.1.18.en-us.linux
## Auto-generated by src2pkg-1.9.9
## Tweaked by Piete Sartain
## src2pkg - Copyright 2005-2009 Gilbert Ashley <amigo@ibilio.org>

SOURCE_NAME='seamonkey-1.1.18.en-US.linux-i686.installer.tar.gz'
ALT_NAME='seamonkey'
ALT_VERSION='1.1.18'  # Use ALT_VERSION to override guessed value
ARCH='i686'
BUILD='1'
PRE_FIX='usr'
# Any extra options go here:
# EXTRA_CONFIGS=""

INSTALL_TYPE='JAIL'

# Optional function replaces configure_source, compile_source, fake_install
# To use, uncomment and write/paste CODE between the {} brackets.
build() {
cd $SRC_DIR
## Not strictly src2pkg-safe, since it relies on sed
sed 's_Location=/usr/local/seamonkey_Location='"$PKG_DIR"'/opt/seamonkey"_' config.ini >> config.ini.new
mv config.ini.new config.ini
./seamonkey-installer -ms
}

# Get the functions and configs
. /usr/libexec/src2pkg/FUNCTIONS ;

# Execute the named packaging steps:
pre_process
find_source
make_dirs
unpack_source
fix_source_perms
configure_source #
compile_source  # If used, the 'build' function replaces these 3
fake_install    #
fix_pkg_perms
strip_bins
create_docs
compress_man_pages
make_description
make_doinst
make_package
post_process

## See the documentation for more help and examples. Below are some of
# the most common Extras and Options for easy cut-and-paste use.
# DOCLIST='' PATCHLIST='' INSTALL_TYPE=''
# CONFIG_COMMAND='' MAKE_COMMAND='' INSTALL_LINE=''
# When editing src2pkg scripts to add custom code, use these variables
# to refer to the current directory, the sources or the package tree:
# $CWD (current directory), $SRC_DIR (sources), $PKG_DIR (package tree)
# Other commonly-used directories include: $DOC_DIR (document directory)
# $MAN_DIR (man-page directory) $DATA_DIR (shared-data directory)

- Piete.

PS: You might try using the [ code][/ code] tags (without spaces) for other text dumps to save forcing a scrollbar on the browser :)

karp 09-19-2009 01:30 AM

Thank you very much!

gnashley 09-19-2009 03:35 PM

Let's see, that archive is not the installer, so you need a script like this:

Code:

#!/bin/bash
## src2pkg script for:        seamonkey-1.1.18.en-us.linux
## Auto-generated by src2pkg-1.9.9
## Tweaked by Piete Sartain
## src2pkg - Copyright 2005-2009 Gilbert Ashley <amigo@ibilio.org>

SOURCE_NAME='seamonkey-1.1.18.en-US.linux-i686.tar.gz'
ALT_NAME='seamonkey'
ALT_VERSION='1.1.18'  # Use ALT_VERSION to override guessed value
ARCH='i686'
BUILD='1'
PRE_FIX='usr'
# Any extra options go here:
# EXTRA_CONFIGS=""
# allow this package to install an empty log file: usr/lib/seamonkey-1.1.18/regxpcom.log
ALLOW_EMPTY_FILES=YES

# Optional function replaces configure_source, compile_source, fake_install
# To use, uncomment and write/paste CODE between the {} brackets.
build() {
sed -i 's_usr\/local/_usr\/' seamonkey
mkdir -p $PKG_DIR/usr/lib/seamonkey-1.1.18
(cd $PKG_DIR/usr/lib ; ln -sf seamonkey-1.1.18 seamonkey)
mkdir -p $PKG_DIR/usr/lib/mre/mre-1.1.18
mv $SRC_DIR/* $PKG_DIR/usr/lib/seamonkey-1.1.18
mkdir -p $PKG_DIR/usr/bin
(cd $PKG_DIR/usr/bin ; ln -sf ../lib/seamonkey-1.1.18 seamonkey)
}

# Get the functions and configs
. /usr/libexec/src2pkg/FUNCTIONS ;

# Execute the named packaging steps:
pre_process
find_source
make_dirs
unpack_source
fix_source_perms
configure_source #
compile_source  # If used, the 'build' function replaces these 3
fake_install    #
fix_pkg_perms
strip_bins
create_docs
compress_man_pages
make_description
make_doinst
make_package
post_process

Then you can run it with:
src2pkg -X -C -VV -W

You'd use the same basic scheme for re-packaging the binary archive of FF.

karp 09-20-2009 06:59 AM

Quote:

Originally Posted by gnashley (Post 3689916)
Let's see, that archive is not the installer, so you need a script like this:

Code:

#!/bin/bash
## src2pkg script for:        seamonkey-1.1.18.en-us.linux
## Auto-generated by src2pkg-1.9.9
## Tweaked by Piete Sartain
## src2pkg - Copyright 2005-2009 Gilbert Ashley <amigo@ibilio.org>

SOURCE_NAME='seamonkey-1.1.18.en-US.linux-i686.tar.gz'
ALT_NAME='seamonkey'
ALT_VERSION='1.1.18'  # Use ALT_VERSION to override guessed value
ARCH='i686'
BUILD='1'
PRE_FIX='usr'
# Any extra options go here:
# EXTRA_CONFIGS=""
# allow this package to install an empty log file: usr/lib/seamonkey-1.1.18/regxpcom.log
ALLOW_EMPTY_FILES=YES

# Optional function replaces configure_source, compile_source, fake_install
# To use, uncomment and write/paste CODE between the {} brackets.
build() {
sed -i 's_usr\/local/_usr\/' seamonkey
mkdir -p $PKG_DIR/usr/lib/seamonkey-1.1.18
(cd $PKG_DIR/usr/lib ; ln -sf seamonkey-1.1.18 seamonkey)
mkdir -p $PKG_DIR/usr/lib/mre/mre-1.1.18
mv $SRC_DIR/* $PKG_DIR/usr/lib/seamonkey-1.1.18
mkdir -p $PKG_DIR/usr/bin
(cd $PKG_DIR/usr/bin ; ln -sf ../lib/seamonkey-1.1.18 seamonkey)
}

# Get the functions and configs
. /usr/libexec/src2pkg/FUNCTIONS ;

# Execute the named packaging steps:
pre_process
find_source
make_dirs
unpack_source
fix_source_perms
configure_source #
compile_source  # If used, the 'build' function replaces these 3
fake_install    #
fix_pkg_perms
strip_bins
create_docs
compress_man_pages
make_description
make_doinst
make_package
post_process

Then you can run it with:
src2pkg -X -C -VV -W

You'd use the same basic scheme for re-packaging the binary archive of FF.

Thank you!!!


All times are GMT -5. The time now is 07:49 PM.