diff options
-rw-r--r-- | README.md | 2 | ||||
-rwxr-xr-x | stowpkg | 24 |
2 files changed, 19 insertions, 7 deletions
@@ -39,6 +39,7 @@ Usage stowpkg search # list packages available on ports stowpkg install <package> # install packages from source + stowpkg build # simple package builder (./configure && make && make install) Coming usage ------------ @@ -49,7 +50,6 @@ Coming usage stowpkg update # update ports repository stowpkg upgrade [package] # upgrade packages stowpkg upstream <package> # check packages versions at upstream - stowpkg build # simple package builder (./configure && make && make install) Running installed applications ------------------------------ @@ -123,11 +123,6 @@ stowpkg_install () { version="latest" fi - # Set PREFIX - if [ -z "$PREFIX" ]; then - PREFIX="$BINARIES/${package}-${version}" - fi - # Resolve default dependencies if [ ! -z "$dependencies_stowpkg" ]; then for dependency in $dependencies_stowpkg; do @@ -166,10 +161,27 @@ stowpkg_install () { fi # Build + stowpkg_build $package $version +} + +function stowpkg_build () { + local package="$1" + local version="$2" + + # TODO + # Check for package and version + # Otherwise try to guess it + + # Set PREFIX + if [ -z "$PREFIX" ]; then + PREFIX="$BINARIES/${package}-${version}" + fi + + # Build if [ -e "$location/rules" ]; then . $location/rules else - # Run default rules + # Try default rules if [ -e "Makefile" ]; then make clean fi |