SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
As I understand them, the basic point of packages is so that they can be easily upgraded or removed. I have a directory that has precompiled files in the subdirectories /etc and /usr. Copying the corresponding files into /usr and /etc on my machine yield a working program. Is there an easy way to create a package so that rather than manually copying them I can just use installpkg and then later either upgrade them or remove them with removepkg or upgradepkg? I know there are programs and scripts to help create packages, but I've never used any of them.
When I need to do things like that, and there is no SBo script for it, I create an SBo type script based on the template or a package with a similar build environment (i.e., GNU automake, etc.).
If you have a proper directory tree just add an install directory with slack-desc and (if required) doinst.sh files, cd to the directory tree and run
Code:
makepkg -l y -c n ../packagename.txz
as root. You should make sure the permissions on the directory tree are correct (since they will overwrite the permissions on the real /) -- root:root and usually 755 for directories and 644 for files. Technically you can pass '-c y' to makepkg instead of '-c n' which will reset all permissions of the package, but this is really done best beforehand so you can verify that all permissions are correct (especially if some directories/files have weird permissions intentionally). See `man makepkg`. I think you can technically get away with not having a slack-desc file but it makes the log messy so I would advise against it.
[edit] By proper directory tree, I mean in /path/to/tree there are for example etc/ and usr/ directories with the desired files. [/edit]
[edit2] Heh, I forgot the package name -- the most important part. Added. [/edit2]
Wow yall were fast on that! I used makepkg and it seemed to work. The program is minidlna and it has a slackbuild, but it refuses to build with the newest ffmpeg package from Eric. What I found is they have a static tarball that is ready to go that works without building or regard to the other packages. It seems to have worked. It's running and the .conf file wound up in /etc just the way I should have! Thanks!
Edit: Worked great! I'm super happy with the way that worked! Thanks again!
What I found is they have a static tarball that is ready to go that works without building or regard to the other packages.
You can even write a proper SlackBuild script for your static tarball. If you don't know exactly how to go about that, you can take a peek at the various SlackBuild scripts for icon themes, for example, where content is just uncompressed and repacked.
You can even write a proper SlackBuild script for your static tarball. If you don't know exactly how to go about that, you can take a peek at the various SlackBuild scripts for icon themes, for example, where content is just uncompressed and repacked.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.