Added a routine, now commented out, to remove all duplicates (not only
[selector.git] / mkdeb.sh
index 3464f29..fa3a029 100755 (executable)
--- a/mkdeb.sh
+++ b/mkdeb.sh
 #  along with selector.  If not, see <http://www.gnu.org/licenses/>.
 #
 
+# 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
+PACKAGE=/tmp/selector_${VERSION}_i386.deb
 
 make -k
 
@@ -32,9 +38,8 @@ for d in DEBIAN usr/bin usr/share/man/man1; 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
+# LIBS=`ldd selector | grep "=> /" | awk '{print $3}'`
+# DEPS=`for l in ${LIBS}; do dpkg -S $l; done | cut -f 1 -d: | sort | uniq`
 
 cat > ${TMP}/DEBIAN/control <<EOF
 Package: selector
@@ -56,6 +61,8 @@ cp ./selector ${TMP}/usr/bin
 cp ./selector.1 ${TMP}/usr/share/man/man1
 gzip ${TMP}/usr/share/man/man1/selector.1
 
-dpkg-deb --build ${TMP} /tmp/selector_${VERSION}_i386.deb
+dpkg-deb --build ${TMP} ${PACKAGE}
+
+dpkg --contents ${PACKAGE}
 
 rm -rf ${TMP}