User Tools

Site Tools


linux:lfs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:lfs [2017/12/18 15:51]
vamp898
linux:lfs [2017/12/18 15:55]
vamp898
Line 1: Line 1:
-====== ​Package Management ​====== +[[Linux:​LFS:​Package Management]]
-Everything is placed under ''/​usr/​src/​packagename/​packageversion''​ +
-===== samples ===== +
-<code bash> +
-VER="​$( pwd | cut -d '/'​ -f 5 )" +
-PKG="​$( pwd | cut -d '/'​ -f 4-5 )" +
-SRC="​$( pwd | cut -d '/'​ -f 4 )-${VER}"​ +
-JOBS=-j8 +
-NEEDS=""​ +
- +
-### DEPCHECK ### +
-for i in ${NEEDS}; do +
-        if [ ! -d /​usr/​pkg/​${i} ​]; then +
-                echo "need: ${i}"​ +
-                exit 6 +
-        fi +
-done +
- +
-### UNPACK ### +
-tar xf ${SRC}.tar.* +
-cd ${SRC} +
-if [ "​$?"​ != "​0"​ ]; then +
-        echo "Error in unpack"​ +
-        exit 1 +
-fi +
- +
-### CONFIGURE ### +
-./configure --prefix=/​usr +
-if [ "​$?"​ != "​0"​ ]; then +
-        echo "Error in configure"​ +
-        exit 2 +
-fi +
- +
-### MAKE ### +
-make ${JOBS} +
-if [ "​$?"​ != "​0"​ ]; then +
-        echo "Error in make"​ +
-        exit 3 +
-fi +
- +
-### POSTMAKE ### +
-make DESTDIR=/​usr/​pkg/​${PKG} install +
-if [ "​$?"​ != "​0"​ ]; then +
-        echo "Error in postmake"​ +
-        exit 4 +
-fi +
- +
-### INSTALL ### +
-cd /​usr/​pkg/​${PKG} +
-for i in f d l; do +
-        find ./ -type ${i} | sed '​s/​^.//​g'​ > .${i} +
-done +
-tar cf - . | (cd / ; tar xf - ) +
-if [ "​$?"​ != "​0" ​]; then +
-        echo "Error in install"​ +
-        exit 5 +
-fi +
- +
-### CLEANUP ### +
-cd /​usr/​src/​${PKG} +
-rm -rf ${SRC} +
-</​code>​+
linux/lfs.txt · Last modified: 2017/12/18 15:55 by vamp898