aboutsummaryrefslogtreecommitdiff
path: root/build-pc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build-pc.sh')
-rwxr-xr-xbuild-pc.sh56
1 files changed, 56 insertions, 0 deletions
diff --git a/build-pc.sh b/build-pc.sh
new file mode 100755
index 0000000..eb7dca8
--- /dev/null
+++ b/build-pc.sh
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+# See LICENSE file for copyright and license details.
+
+VERSION=0.0.1
+
+while [ $# -gt 0 ]
+do
+ case $1 in
+ -p|--prefix)
+ shift
+ PREFIX=$1
+ ;;
+ -n|--name)
+ shift
+ NAME=$1
+ ;;
+ -ln|--lib-name)
+ shift
+ LIBNAME=$1
+ ;;
+ -d|--description)
+ shift
+ DESCR=$1
+ ;;
+ -v|--version)
+ shift
+ VERSION=$1
+ ;;
+ *)
+ TARGET=$1
+ ;;
+ esac
+ shift
+done
+
+if [ -z $PREFIX ]; then
+ echo 'prefix must be set'
+ exit 1
+elif [ -z $NAME ]; then
+ echo 'name must be set'
+ exit 1
+fi
+
+cat <<EOF > $TARGET
+prefix=$PREFIX
+exec_prefix=\${prefix}
+includedir=\${prefix}/include
+libdir=\${exec_prefix}/lib
+
+Name: $NAME
+Description: $LIBNAME - $DESCR
+Version: $VERSION
+Cflags: -I\${includedir}
+Libs: -L\${libdir} -l$NAME
+EOF