[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
slackware:package_management_hands_on [2014/02/09 16:36 (UTC)] – Work in progress kikinovak | slackware:package_management_hands_on [2014/02/17 06:53 (UTC)] – Work in progress kikinovak | ||
---|---|---|---|
Line 465: | Line 465: | ||
# installpkg / | # installpkg / | ||
</ | </ | ||
+ | |||
+ | ==== Modify an official Slackware package ==== | ||
+ | |||
+ | The main reason for rebuilding an official package is to modify it, for example to add or strip certain functionalities. In the following example, we will rebuild the '' | ||
+ | |||
+ | Let's begin with removing the package if it is installed: | ||
+ | |||
+ | < | ||
+ | # removepkg audacious-plugins | ||
+ | </ | ||
+ | |||
+ | Now create a suitable directory to store the source code: | ||
+ | |||
+ | < | ||
+ | # cd / | ||
+ | # mkdir audacious-plugins | ||
+ | # cd audacious-plugins | ||
+ | # links mirrors.slackware.com | ||
+ | </ | ||
+ | |||
+ | Fetch the contents of the ''/ | ||
+ | |||
+ | < | ||
+ | # chmod +x audacious-plugins.SlackBuild | ||
+ | # ls -lh | ||
+ | total 1,4M | ||
+ | -rw-r--r-- 1 root root 1,4M nov. 24 15:28 audacious-plugins-3.3.1.tar.xz | ||
+ | -rwxr-xr-x 1 root root 4,0K nov. 24 15:28 audacious-plugins.SlackBuild* | ||
+ | -rw-r--r-- 1 root root 892 nov. 24 15:28 slack-desc | ||
+ | </ | ||
+ | |||
+ | Now edit '' | ||
+ | |||
+ | < | ||
+ | ... | ||
+ | # Configure: | ||
+ | CFLAGS=" | ||
+ | CXXFLAGS=" | ||
+ | ./configure \ | ||
+ | --prefix=/ | ||
+ | --libdir=/ | ||
+ | --sysconfdir=/ | ||
+ | --mandir=/ | ||
+ | --enable-amidiplug \ | ||
+ | --disable-gtkui \ -> add this option | ||
+ | --program-prefix= \ | ||
+ | --program-suffix= \ | ||
+ | ${ARCHOPTS} \ | ||
+ | --build=$ARCH-slackware-linux | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | Build and install the package: | ||
+ | |||
+ | < | ||
+ | # ./ | ||
+ | ... | ||
+ | Slackware package / | ||
+ | # installpkg / | ||
+ | </ | ||
+ | |||
+ | ==== Choosing your configuration options for compiling ==== | ||
+ | |||
+ | The source configuration script (or more exactly the sometimes very long line in the SlackBuild beginning with '' | ||
+ | |||
+ | < | ||
+ | ... | ||
+ | # Configure: | ||
+ | CFLAGS=" | ||
+ | CXXFLAGS=" | ||
+ | ./configure \ | ||
+ | --prefix=/ | ||
+ | --libdir=/ | ||
+ | --sysconfdir=/ | ||
+ | --mandir=/ | ||
+ | --enable-amidiplug \ | ||
+ | --program-prefix= \ | ||
+ | --program-suffix= \ | ||
+ | ${ARCHOPTS} \ | ||
+ | --build=$ARCH-slackware-linux | ||
+ | |||
+ | exit 1 -> add this option to interrupt the script | ||
+ | |||
+ | # Build and install: | ||
+ | make $NUMJOBS || make || exit 1 | ||
+ | make install DESTDIR=$PKG || exit 1 | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | Now run the script and wait a few seconds for the configuration overview: | ||
+ | |||
+ | < | ||
+ | # ./ | ||
+ | ... | ||
+ | Configuration: | ||
+ | | ||
+ | ... | ||
+ | |||
+ | Interfaces | ||
+ | ---------- | ||
+ | GTK (gtkui): | ||
+ | Winamp Classic (skins): | ||
+ | </ | ||
+ | |||
+ | Use the '' | ||
+ | |||
+ | < | ||
+ | # tar xvf audacious-plugins-3.3.1.tar.xz | ||
+ | # cd audacious-plugins-3.3.1 | ||
+ | # ./configure --help | less | ||
+ | ... | ||
+ | --disable-speedpitch | ||
+ | --disable-gtkui | ||
+ | --disable-skins | ||
+ | --disable-lyricwiki | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | <note tip>The SlackBuild script already takes care of automatically uncompressing the source tarball to the ''/ | ||
+ | |||
+ | < | ||
+ | |||
+ | Once you've chosen all your configuration options, get rid of the temporary '' | ||
+ | |||
+ | < | ||
+ | # ./ | ||
+ | ... | ||
+ | Slackware package / | ||
+ | # installpkg / | ||
+ | </ | ||
+ | |||
**WORK IN PROGRESS** | **WORK IN PROGRESS** | ||
====== Sources ====== | ====== Sources ====== | ||
- | < | + | |
+ | | ||
<!-- Please do not modify anything below, except adding new tags.--> | <!-- Please do not modify anything below, except adding new tags.--> | ||
<!-- You must also remove the tag-word " | <!-- You must also remove the tag-word " | ||
- | {{tag> | + | {{tag> |