Uma maneira rápida e fácil seria usar alien
, converter .tar
em .deb
:
tar czf pkg-name.tgz usr/
fakeroot alien -d pkg-name.tgz
Senão usar o jeito antigo, eu uso um Makefile assim:
all: deb
deb:
mkdir -p tmp/usr/bin tmp/DEBIAN tmp/etc tmp/usr/share/man/man5
find tmp -type d | xargs chmod 755
cp some.conf tmp/etc/
cp man/some.5 tmp/usr/share/man/man5/
cp somecmd tmp/usr/bin/
tar c --owner root --group root -v -z -f tmp/data.tar.gz -C tmp ./etc ./usr
cd tmp && find usr/ etc/ -type f | xargs md5sum >DEBIAN/md5sums
awk '/^#Package:/{i++}i {print substr($$0,2); }' Makefile >tmp/DEBIAN/control
tar c --owner root --group root -v -z -f tmp/control.tar.gz -C tmp/DEBIAN ./control ./md5sums
echo 2.0 >tmp/debian-binary
ar rcv pkg-name_1.0-1.deb tmp/debian-binary tmp/control.tar.gz tmp/data.tar.gz
.phony: clean
clean:
-rm -fr tmp
#Package: pkg-name
#Version: 1.0
#Section: net
#Priority: optional
#Architecture: all
#Essential: no
#Installed-size: 100
#Maintainer: Name <mail@here>
#Depends: optional dependencies
#Description: short descr
# long descr