LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-08-2008, 12:24 AM   #1
mocqueanh
Member
 
Registered: Dec 2007
Location: Vietnam
Distribution: Slackware, Xubuntu, Puppy, WinXP
Posts: 38

Rep: Reputation: 15
Questions about making package


When use makepkg command to make Slackware package, i cd to source code folder(i try makepkg with MPlayer, folder is: /Mydata/test/MPlayer), type
./configure --enable-gui
make
make install --prefix=/Mydata/test/MPlayer/build
(i do it as the tutorial on linuxpackages.net)
then: makepkg mplayer-custom-1.0.tgz

Package made done, i use: installpkg -warn mplayer-custom-1.0.tgz
The test result told me: file and folder of MPlayer will install to Root folder ( / )
And when after real installionwith own package, i cant use: gmplayer to call MPlayer (using bash shell). Then type: /gmplayer
will call MPlayer for me (because i guess MPlayer install to /, so i execute the gmplayer file to call MPlayer)

BTW, also about this thing, i have extra question: when i install a software from source, if i dont want to install it to default folder(usually is: /usr), i change to my installion folder: /opt by type: ./configure --prefix=/opt when compile it, also install done, but cant run it by normal command: gmplayer (fox example), always receive: command not found. I have to type /"path to executable file of software" to call. Why ?
I see some packages include dependencies for me, or include some extra for installion.How to add some additional to my package ? Example: i want to add skins for MPlayer package (by default, if install from source, i have to decompress skin to MPlayer after installion.) This question is for both commands: makepkg and src2pkg

And i've tried make package with src2pkg, i was successful with Gimp GAP package, but inside my gimp-gap.tgz, i dont see the file: doinst.sh file as many packages which i downloaded. But my own gim-gap.tgz installed well, no problem.

Can you test my gimp-gap package for me ?
Code:
http://www.mediafire.com/?2ayhzk15sz5
When use src2pkg command to create package, how to add comment for my package ? The default comment is: create by src2pkg, i want to change it
 
Old 02-08-2008, 02:32 AM   #2
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Blog Entries: 2

Rep: Reputation: 30
You could have a look at slackbuilds.org. You can look at their mplayer.SlackBuild to see how they built it. It might help you a bit.

http://slackbuilds.org/repository/12...media/MPlayer/
 
Old 02-08-2008, 07:00 AM   #3
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 614Reputation: 614Reputation: 614Reputation: 614Reputation: 614Reputation: 614
"When use src2pkg command to create package, how to add comment for my package ? The default comment is: create by src2pkg, i want to change it"

You can change this by editing the file /etc/src2pkg/src2pkg.conf
right near the top there is a variable called SIGNATURE. Just uncomment the line(remove the '#' at thre beginning of the line) and change it to whatever you want like:
SIGNATURE="Packaged by mocqueanh"

If you are not getting any doinst.sh file created automatically, that means that no links are created by the installation. But, myn packages need some sort of doinst.sh script for other resons. Not all packages have them.

Below is a src2pkg build script for mplayer which may work for you. You'll need to change the SOURCE_NAME and VERSION if you are compiling some other version

Code:
#!/bin/bash
## src2pkg script for: 	mplayer
## src2pkg Copyright 2005-2007 Gilbert Ashley <amigo@ibilio.org>

SOURCE_NAME='MPlayer-1.0rc1.tar.bz2'
ALT_NAME='mplayer'
VERSION='1.0rc1'
ARCH='i486'
BUILD='2'
PRE_FIX='/usr'
# Any extra options go here
EXTRA_CONFIGS='--enable-gui --enable-gkt1'
# STD_FLAGS='-O2 -march=i486 -mtune=i686'

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

# do_all_processes can substitute these 16 steps:

pre_process
find_source
make_dirs
unpack_source
fix_source_perms

# configure_source
# compile_source

cd $SRC_DIR && ./configure --prefix=/$PRE_FIX --enable-gui --enable-gtk1
cd $SRC_DIR && make -i 1> /dev/null

fake_install

# remove these links which get created by the doinst.sh
rm -f $PKG_DIR/usr/man/man1/mencoder.1
rm -f $PKG_DIR/usr/bin/gmplayer

fix_pkg_perms
strip_bins
create_docs
compress_man_pages
make_description
make_doinst
make_package
post_process

# src2pkg - Copyright 2005-2007  Gilbert Ashley <amigo@ibiblio.org>
And here's the doinst.sh that goes with it:
Code:
( cd usr/bin ; rm -rf gmplayer )
( cd usr/bin ; ln -sf mplayer gmplayer )
( cd usr/lib ; rm -rf libdha.so.1 )
( cd usr/lib ; ln -sf libdha.so.1.0 libdha.so.1 )
( cd usr/man/man1 ; rm -rf mencoder.1.gz )
( cd usr/man/man1 ; ln -sf mplayer.1.gz mencoder.1.gz )
Just place the doinst.sh in the same directory with the source tarball and the src2pkg script and then run 'src2pkg -X'
 
Old 02-08-2008, 07:19 AM   #4
mocqueanh
Member
 
Registered: Dec 2007
Location: Vietnam
Distribution: Slackware, Xubuntu, Puppy, WinXP
Posts: 38

Original Poster
Rep: Reputation: 15
Thank you all, i went to slackbuilds.org, haven't read all tutorials yet, but this site look like providing build script for me to make package.

To make package for myself that dont need any helping script of other, Do i have to know C programming ? I'm not programmer, and even dont know C, just have a little knowledge of Python and Ruby.


Sorry for my bad English
 
Old 02-08-2008, 01:30 PM   #5
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
If you want to build software from source then package it into a Slackware Package then no - you don't need to know C. There are lot of sites giving information on Slackware package creation so try Googling about.

Also you might find it useful to learn Bash scripting so you can create your own scripts and dissect Slackbuilds. Again Google is your friend here.

I you want to create the code for the software itself then yes, C/C++ is pretty much the language of choice.
 
Old 02-08-2008, 02:00 PM   #6
pdw_hu
Member
 
Registered: Nov 2005
Location: Budapest, Hungary
Distribution: Slackware, Gentoo
Posts: 346

Rep: Reputation: Disabled
Just use 'make DESTDIR=/home/user/tempdir install'. 99% of the programs honor the DESTDIR parameter (and those who don't are usually really simple or very old programs which don't even deserve a package), so it will just install to that directory. From there you makepkg whatever.tgz.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Making a Java Package for Slack 12 mattydee Slackware 3 08-09-2007 10:10 AM
Making RPM package vikasumit Programming 1 09-02-2006 06:17 AM
Making a Slackware package.... ivoencarnacao Slackware 5 02-25-2005 07:21 AM
problem making slackware package busbarn Programming 3 07-21-2004 08:12 PM
making an RPM package ?? rinux Linux - Software 1 09-24-2003 07:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration