diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-09-18 17:06:42 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-09-18 17:06:42 -0300 |
commit | 3442ee78ec17ad97fc16524480f3f3e4f6a37ee6 (patch) | |
tree | 4529d43beb2757a59b0a66f2057872473b504d10 | |
parent | dd0a1af2ebb3cbb36cdaf13a4cc6fbb22bb44ec8 (diff) | |
download | stowpkg-3442ee78ec17ad97fc16524480f3f3e4f6a37ee6.tar.gz stowpkg-3442ee78ec17ad97fc16524480f3f3e4f6a37ee6.tar.bz2 |
Adds stowpkg_build
-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 |