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 12-24-2008, 02:03 PM   #1
Romanus81
Member
 
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
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,193

Rep: Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307
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
gnashley
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
usr/bin/proggie
usr/lib/libproggie.so

Code:
#!/bin/bash
mkdir /tmp/proggie
cd /tmp/proggie
for FILE in $(cat file-list.txt) ; do
 if [[ -f /$FILE ]] ; then
 cp --parents $FILE .
 fi
done
 
Old 12-25-2008, 11:06 AM   #4
HerbertJ
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".
 
  


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
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

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

All times are GMT -5. The time now is 02:04 AM.

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