]> gitweb.fluxo.info Git - stowpkg.git/commitdiff
Updates README
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 18 Sep 2017 22:30:27 +0000 (19:30 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 18 Sep 2017 22:30:27 +0000 (19:30 -0300)
README.md
stowpkg

index 0c5676ee1e2c22018365ed59110f29255a51741a..1230bea4cc90561768b603d3da7e6e979afb0e01 100644 (file)
--- a/README.md
+++ b/README.md
@@ -12,12 +12,6 @@ Features
 * Repository signature verification using GnuPG and signed git commits.
 * Small enough so everybody can learn how a package manager works.
 
-Coming features
----------------
-
-* Automatic application patching.
-* Source code verification using multiple methods (commit hash, checksums, OpenPGP).
-
 Installation
 ------------
 
@@ -41,56 +35,29 @@ Usage
     stowpkg install  <package> # install packages from source
     stowpkg build              # simple  package  builder (./configure && make && make install)
 
-Coming usage
-------------
-
-    stowpkg list               # list    packages installed
-    stowpkg remove   <package> # remove  packages
-    stowpkg purge    <package> # purge   packages
-    stowpkg update             # update  ports    repository
-    stowpkg upgrade  [package] # upgrade packages
-    stowpkg upstream <package> # check   packages versions at upstream
-
 Running installed applications
 ------------------------------
 
 Make sure to include stowpkg package tree into your `PATH`, `MANPATH`, `LD_LIBRARY_PATH`, etc.
 
-Params
-------
-
-Passe using environment variables:
-
-* `BASE`: defaults `<stowpkg-repo>/tree/<architecture>`, but can be configured to anything like
-  `/usr/local` with corresponding packages installed `/usr/local/stowpkg`.
-
 Configuration
 -------------
 
-Use `~/.config/stowpkg` do put any default parameters.
+Use `~/.config/stowpkg` do put any default parameters. Current supported params include
 
-Ports layout
-------------
+* `BASE`: defaults to `<stowpkg-repo>/tree/<architecture>`, but can be configured to anything like
+  `/usr/local` with corresponding packages installed at `/usr/local/stow`.
 
-Check the repo for examples :)
-
-Repository layout
+Filesystem layout
 -----------------
 
-Starting from `$BASE` (like `/usr/local`) we have:
+Current ports tree is distributed directly along with `stowpkg` source repository.
+A binary repository has the following layout starting from `$BASE` (like `/usr/local`):
 
     {bin,lib,man,share,etc,src}: usual Unix paths
     stow
         package_name-VERSION
 
-Further development
--------------------
-
-Per-architecture binary package support using git-annex and GnuPG signatures, including:
-
-    stowpkg pack  <package> # pack an installed package
-    stowpkg fetch <package> # fetch package from the repo
-
 What it does
 ------------
 
@@ -104,6 +71,27 @@ If you want to do it manually:
     cd /usr/local/stow/
     sudo stow luakit
 
+Further development
+-------------------
+
+* Automatic application patching.
+* Source code verification using multiple methods (commit hash, checksums, OpenPGP).
+
+Other commands can easily be implemented:
+
+    stowpkg list               # list    packages installed
+    stowpkg remove   <package> # remove  packages
+    stowpkg purge    <package> # purge   packages
+    stowpkg update             # update  ports    repository
+    stowpkg upgrade  [package] # upgrade packages
+    stowpkg upstream <package> # check   packages versions at upstream
+
+Also, per-architecture binary package support might be implemented using
+git-annex and GnuPG signatures, giving us commands like
+
+    stowpkg pack  <package> # pack an installed package
+    stowpkg fetch <package> # fetch package from the repo
+
 References
 ----------
 
diff --git a/stowpkg b/stowpkg
index 33272454ffdf6bec9be000cc10623614032d5e2b..545547625ad3fc204694f64719e4d05201531a34 100755 (executable)
--- a/stowpkg
+++ b/stowpkg
@@ -175,9 +175,11 @@ stowpkg_build () {
   local package="$1"
   local version="$2"
 
-  # TODO
-  # Check for package and version
-  # Otherwise try to guess it
+  # Check
+  if [ -z "$version" ]; then
+    echo "$BASENAME: please specify package name and version"
+    exit 1
+  fi
 
   # Set PREFIX
   if [ -z "$PREFIX" ]; then