X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=mkdeb.sh;h=cc69852d95b477138aca6ea4cf9c403463ff87bb;hb=0011341d45f00444e2ba395bb749e1b39d94c276;hp=3464f293a545272d2cf791e24ec8705797ecdf07;hpb=6c982fc933772ff73c3db06b806456043d17dc57;p=selector.git diff --git a/mkdeb.sh b/mkdeb.sh index 3464f29..cc69852 100755 --- a/mkdeb.sh +++ b/mkdeb.sh @@ -22,40 +22,45 @@ # 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. +VERSION=1.0-R$(cat REVISION_NUMBER) +PACKAGE=/tmp/selector_${VERSION}_i386.deb +BIN_PATH="usr/bin" +MAN_PATH="usr/share/man/man1" make -k TMP=`mktemp -d /tmp/deb.XXXXXX` -for d in DEBIAN usr/bin usr/share/man/man1; do +for d in DEBIAN ${BIN_PATH} ${MAN_PATH}; do mkdir -p ${TMP}/${d} done -# for l in `ldd selector | grep "=> /" | awk '{print $3}'`; do - # dpkg -S $l -# done | cut -f 1 -d: | sort | uniq +LIB_DEPENDS=$(dpkg-shlibdeps -O ./selector | grep Depends | sed -e "s/^.*Depends=//") cat > ${TMP}/DEBIAN/control < Architecture: i386 -Depends: libncurses5, libstdc++6, libc6, libgcc1 -Description: A command line for dynamic string-matching. +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 ';', the display is updated in real time - to show only the lines containing all the said strings. The main - usage of selector is as an efficient search in the shell command + list of substrings separated by ';', or a regexp, the display is + updated in real time to show only the matching lines. 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/share/man/man1 -gzip ${TMP}/usr/share/man/man1/selector.1 +cp ./selector ${TMP}/${BIN_PATH} +cp ./selector.1 ${TMP}/${MAN_PATH} +gzip ${TMP}/${MAN_PATH}/selector.1 -dpkg-deb --build ${TMP} /tmp/selector_${VERSION}_i386.deb +dpkg-deb --build ${TMP} ${PACKAGE} + +dpkg --contents ${PACKAGE} rm -rf ${TMP}