Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 12-24-2008, 02:03 PM   #1
Registered: Feb 2008
Posts: 201

Rep: Reputation: 31
Is there a way I can create a package from a list of files?

I remember awhile ago there was a thread where someone was asking about creating a package from a software installer such as a .run file. I couldn't find the thread, and tried doing it myself. I used the find command and found all the files the installer put on my system, so basically I have a list of all these files. Is there a way I can put all these files into a package? I know I will need the slack-desc, is there anything else?
Old 12-24-2008, 02:21 PM   #2
LQ Guru
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,215

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
This would probably be the easiest way to do it.

Create an empty directory. Run the .run file again, and this time install into the directory you just created. Now run makepkg on that directory.

This assumes that the .run file installs to the root of your filesytem by default. If not, then, well, you know what to do.

If you do it right, then installing the package will overwrite the files already on your system, and removing the package will remove them.

Last edited by dugan; 12-24-2008 at 02:26 PM.
Old 12-25-2008, 01:44 AM   #3
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
The .run installer may install things directly to / without respecting any sort of prefix or DESTDIR.
To build a package from a file list, simply create an empty directory and copy the dir and file structure in there. Use 'cp --parents ... ...' to create the missing directories.
Something like this ought to do it for you, if the list is long:

cat file-list.txt

mkdir /tmp/proggie
cd /tmp/proggie
for FILE in $(cat file-list.txt) ; do
 if [[ -f /$FILE ]] ; then
 cp --parents $FILE .
Old 12-25-2008, 11:06 AM   #4
LQ Newbie
Registered: Oct 2008
Posts: 28

Rep: Reputation: 16
Create a new directory and set up the files from that directory as if you were starting from /. Once you have your paths set up in the separate directory, cd to the new root for the package and run.

makepkg -l y -c n NEW_PACKAGEFILE.tgz

This will create the package using "makepkg".


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
how to create a list of files and folders (name and size only) rastiazul Linux - General 16 11-04-2008 03:14 PM
how to create a simple script for installing a list of files zbenjudah Debian 28 04-16-2007 03:03 PM
How to list only files belong to a package linuxcrazyguy Debian 4 04-08-2007 07:02 PM
List files in a package before installing? humbletech99 Debian 3 06-02-2006 03:35 AM
List the files installed by a RPM package s_deepak_123 Linux - General 6 02-20-2006 12:14 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:32 AM.

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