X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=mkdeb.sh;h=dff4880469e6ce5342df09d012e897fdf5251575;hb=c3973ff66bfb73b40d030fd8fb682007d0d05d5c;hp=d70c74a97788e67b13466a081d840ec644ca7b79;hpb=9e81a172c9af260e5ff383039774c244b6369ed0;p=selector.git diff --git a/mkdeb.sh b/mkdeb.sh index d70c74a..dff4880 100755 --- a/mkdeb.sh +++ b/mkdeb.sh @@ -22,26 +22,46 @@ # along with selector. If not, see . # -VERSION=1.0 +# This script creates the Debian package. The way it does it is +# probably not very conventional. I am open to suggestions. + +# Depends: ${shlibs:Depends} + +VERSION=1.0-R`git log|grep ^commit|wc -l` +PACKAGE=/tmp/selector_${VERSION}_i386.deb + +make -k TMP=`mktemp -d /tmp/deb.XXXXXX` -for d in DEBIAN usr/bin usr/man/man1; do +for d in DEBIAN usr/bin usr/share/man/man1; do mkdir -p ${TMP}/${d} done +LIB_DEPENDS=$(dpkg-shlibdeps -O ./selector|grep Depends|sed -e "s/^.*Depends=//") + cat > ${TMP}/DEBIAN/control < -Description: A command line dynamic string-matching Architecture: i386 -Depends: libncurses5, libstdc++6, libc6, libgcc1 +Depends: ${LIB_DEPENDS} +Description: A command line for dynamic string-matching. + This is a command line for dynamic string selection. As you type a + list of strings separated by ';' or a regexp, the display is updated + in real time to show only the lines with matching content. The main + usage of selector is as an efficient search in the shell command + history. With the correct option, it will inject the selected line + into the virtual tty input buffer, hence allowing the user to edit + the line and execute it as a standard command. EOF cp ./selector ${TMP}/usr/bin -cp ./selector.1 ${TMP}/usr/man/man1 +cp ./selector.1 ${TMP}/usr/share/man/man1 +gzip ${TMP}/usr/share/man/man1/selector.1 + +dpkg-deb --build ${TMP} ${PACKAGE} -dpkg-deb --build ${TMP} selector_${VERSION}_i386.deb +dpkg --contents ${PACKAGE} rm -rf ${TMP}