Paket Debian Sederhana Tanpa Kompilasi


Saya baru tahu kalau ada debian package maker GUI (debian package maker ) 😳 dari mahasiswa saya. Sebelumnya saya lebih suka membuat from scratch. Untuk yang baru belajar membuat paket debian, tools ini  dapat menjadi pilihan. Tapi perhatikan dulu tutorial saya sebelumnya. Jangan asal sembarang klik dan klik.

Yuk kita kembali ke scratch lagi, lebih maknyuss begitu 😀

buat direktori paket kita misalnya paket kita namanya iin dan mempunyai versi 1.0. Dalam menulis aturan direktori paket dan versi dipisahkan tanda minus (-)

aini@aini-desktop:~$ mkdir iin-1.0
aini@aini-desktop:~$ cd iin-1.0/

sekarang kita buat paket dengan bantuan dh_make.
aini@aini-desktop:~/iin-1.0$ dh_make -n -e aini@aini.org
Type of package: single binary, multiple binary, library, kernel module or cdbs?
[s/m/l/k/b] s
Maintainer name : Nur Aini Rakhmawati
Email-Address   : aini@aini.org
Date            : Sat, 10 Jan 2009 09:30:51 +0700
Package Name    : iin
Version         : 1.0
License         : gpl
Type of Package : Library
Hit to confirm:
Currently there is no top level Makefile. This may require additional tuning.
Done. Please edit the files in the debian/ subdirectory now. You should also
check that the iin Makefiles install into $DESTDIR and not in / .
Make sure you change the package name from iinBROKEN to something
else, such as iin1 in the debian/control file.

Kita periksa apakah folder debian sudah terbentuk
aini@aini-desktop:~/iin-1.0$ ls debian/
changelog  emacsen-install.ex  iin-dev.install  menu.ex        rules
compat     emacsen-remove.ex   iin.doc-base.EX  postinst.ex    shlibs.local.ex
control    emacsen-startup.ex  init.d.ex        postrm.ex      watch.ex
copyright  iin1.dirs           init.d.lsb.ex    preinst.ex
cron.d.ex  iin1.install        manpage.1.ex     prerm.ex
dirs       iin-default.ex      manpage.sgml.ex  README
docs       iin-dev.dirs        manpage.xml.ex   README.Debian

buat file sembarang untuk percobaan
misal iin.sh dengan isi :
#!/bin/sh
echo "Allloo ... "

ubah file jadi executable (kita anggap iin.sh adalah program)
aini@aini-desktop:~/iin-1.0$ chmod +x iin.sh

buka file rules di dalam direktori debian, edit menjadi sbb :
#!/usr/bin/make -f

build: build-stamp
build-stamp:
    dh build
    touch build-stamp

clean:
    dh clean

install: build install-stamp
install-stamp:
    dh install
    touch install-stamp

binary-arch: install
    dh_install iin.sh usr/sbin
    dh binary-arch

binary-indep: install
    dh binary-indep

binary: binary-arch binary-indep

Catatan :
dh_install iin.sh /usr/bin/
di bagian binary-arch: build install (file rules)
Maksudnya saat proses instalasi akan dikopi file iin.sh ke /usr/bin

sekarang kita bangun paket.
aini@aini-desktop:~/iin-1.0$ debuild -us -uc
dpkg-buildpackage -rfakeroot -D -us -uc
dpkg-buildpackage: set CPPFLAGS to default value:
dpkg-buildpackage: set CFLAGS to default value: -g -O2
dpkg-buildpackage: set CXXFLAGS to default value: -g -O2
dpkg-buildpackage: set FFLAGS to default value: -g -O2
dpkg-buildpackage: set LDFLAGS to default value: -Wl,-Bsymbolic-functions
dpkg-buildpackage: source package iin
dpkg-buildpackage: source version 1.0
dpkg-buildpackage: source changed by Nur Aini Rakhmawati
dpkg-buildpackage: host architecture i386
fakeroot debian/rules clean
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
#-/usr/bin/make clean
dh_clean
dpkg-source -b iin-1.0
dpkg-source: building iin in iin_1.0.tar.gz
dpkg-source: building iin in iin_1.0.dsc
debian/rules build
dh_testdir
# Add here commands to configure the package.
touch configure-stamp
dh_testdir
# Add here commands to compile the package.
#/usr/bin/make
touch build-stamp
fakeroot debian/rules binary
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/tmp
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
dh_install iin.sh /usr/bin/
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dpkg-gencontrol: warning: unknown substitution variable ${shlibs:Depends}
dpkg-gencontrol: warning: unknown substitution variable ${misc:Depends}
dh_md5sums
dh_builddeb
dpkg-deb: building package `iin' in `../iin_1.0_i386.deb'.
dpkg-genchanges  >../iin_1.0_i386.changes
dpkg-genchanges: including full source code in upload
dpkg-buildpackage: full upload; Debian-native package (full source is included)
Now running lintian...
W: iin source: dh-make-template-in-source debian/init.d.ex
W: iin source: dh-make-template-in-source debian/manpage.sgml.ex
W: iin source: dh-make-template-in-source debian/manpage.xml.ex
W: iin source: dh-make-template-in-source debian/emacsen-remove.ex
W: iin source: dh-make-template-in-source debian/iin-default.ex
W: iin source: dh-make-template-in-source debian/menu.ex
W: iin source: dh-make-template-in-source debian/manpage.1.ex
W: iin source: dh-make-template-in-source debian/preinst.ex
W: iin source: dh-make-template-in-source debian/postinst.ex
W: iin source: dh-make-template-in-source debian/cron.d.ex
W: iin source: dh-make-template-in-source debian/iin.doc-base.EX
W: iin source: dh-make-template-in-source debian/init.d.lsb.ex
W: iin source: dh-make-template-in-source debian/emacsen-startup.ex
W: iin source: dh-make-template-in-source debian/emacsen-install.ex
W: iin source: dh-make-template-in-source debian/postrm.ex
W: iin source: dh-make-template-in-source debian/watch.ex
W: iin source: dh-make-template-in-source debian/prerm.ex
W: iin source: out-of-date-standards-version 3.7.2 (current is 3.8.0)
W: iin: binary-without-manpage usr/bin/iin.sh
W: iin: script-with-language-extension usr/bin/iin.sh
W: iin: readme-debian-contains-debmake-template
W: iin: copyright-lists-upstream-authors-with-dh_make-boilerplate
W: iin: copyright-has-url-from-dh_make-boilerplate
W: iin: copyright-contains-dh_make-todo-boilerplate
W: iin: copyright-without-copyright-notice
E: iin: description-is-dh_make-template
E: iin: section-is-dh_make-template
Finished running lintian.

sekarang diinstall yuk 🙂
filenya diluar direktori iin-1.0
aini@aini-desktop:~/iin-1.0$ cd ..
aini@aini-desktop:~$ ls iin*
iin_1.0.dsc         iin_1.0_i386.changes  iin_1.0.tar.gz
iin_1.0_i386.build  iin_1.0_i386.deb
aini@aini-desktop:~$ dpkg -i iin_1.0_i386.deb

Nah, skr kita jalankan program
aini@aini-desktop:~$ iin.sh
Allloo ...

Alhamdulillah program debian kita sudah terinstal

    • Taurisa
    • Januari 11th, 2009

    buk.. setelah saya coba kok tetap gak bisa ya? file nya gak ter-copy di direktori /usr/bin/

  1. mbak aku tu pingin buat web sendiri pake joomla…tp masih binggung buatnya…trus softwarenya ajaa lum dapet…tolong kirimin software joomla web maker ya…ke email q…trus kasih tau cara makenya… ” belajar,GANBATTE ( semangat )!!!!!!

    • mieney
    • Januari 23rd, 2009

    mw tnya ..
    gimana ya cra’nya bwt ganti header d joomla 1.5
    blez yaaa..
    thx

  1. No trackbacks yet.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s