#!/bin/sh -e if [ ! -x ./build/fwm ]; then echo "compile first!" exit fi rm -Rf ./build/deb mkdir ./build/deb # place files mkdir -p ./build/deb/etc/X11/fwm ./build/deb/usr/bin ./build/deb/usr/share/man/man1 ./build/deb/usr/share/man/ru/man1 cp -p ./build/fwm ./build/deb/usr/bin/fwm cp -p ./fwm.conf ./build/deb/etc/X11/fwm/fwm.conf gzip < ./fwm.1 > ./build/deb/usr/share/man/man1/fwm.1.gz gzip < ./fwm.ru.1 > ./build/deb/usr/share/man/ru/man1/fwm.1.gz # place controls VERSION=`head -1 ./CHANGELOG.TXT | tr -d -` ARCH=`dpkg --print-architecture` SIZE=`du -k -s ./build/deb | awk '{print $1}'` VER1=`dpkg-query -W -f='${Version}' libc6` VER2=`dpkg-query -W -f='${Version}' libx11-6` VER3=`dpkg-query -W -f='${Version}' libfccl` mkdir ./build/deb/DEBIAN ( cd ./build/deb && md5deep -r -l usr) > ./build/deb/DEBIAN/md5sums cat > ./build/deb/DEBIAN/control < Installed-Size: $SIZE Depends: libc6 (>= $VER1), libx11-6 (>= $VER2), libfccl (>= $VER3) Provides: x-window-manager Section: x11 Priority: optional Multi-Arch: foreign Homepage: https://dev.m1089.ru/fwmx Description: firk's window manager fwm is a window manager for the X Window System. EOF cp pkg/deb/* ./build/deb/DEBIAN/ fakeroot dpkg-deb --build ./build/deb ./build rm -Rf ./build/deb echo "DONE"