Documentation: Debian Build

Javascript Libraries

There has been a start in generating packages such as 'yui', 'ext' and 'tinymce' in Debian space. The problem currently is there is no real standard for this, or the name space where they are linked on the web servers.

  • What name to use for Alias entry, e.g. Alias /usr/share/yui/www to /yui (polluting name space) or /scripts/yui (not just scripts) or lib/yui (probably best)
  • What system to install it for, e.g. Apache, Apache2, LightHTTPD etc
  • To automatically create, or to do manually - e.g. /etc/apache2/conf.d/lib-yui.conf - would be nice. Optional install ?
  • How to other systems determine the path, e.g. Installing Moodle may need to know where Tinymce is, is it /lib/tinymce/*.js?

Potential Libraries already available

  • Tinymce (Debian & Ubuntu 2.0.8)
  • YUI (Debian & Ubuntu 2.2.2)
  • Ext ??? (don't depend on others) (Question - does Zaltana depend on Yui, or only Ext which in tern used to depend on Yui?)

Debian vs Ubuntu vs Nexenta

  • Name dependencies? (e.g. is it libext-javascript or just ext)
  • Compiled versions are an issue

How to add debian to your package

Makefile

Have a makefile in the root of your package which has an "install" target which accepts "DESTDIR=" for the top level directory, to allow debian to install it in the right place.

E.g. (NOTE: All entries under rules, except ifndef et al must be one tap in, e.g. replace sets of 8 spaces below with tabs)

clean:
        @echo "Does nothing"

install: 

ifndef DESTDIR
        @echo "Invalid Destination directory"
else

        @echo "Copying files to" $(DESTDIR)
        install -c -d $(DESTDIR)/$(INSTALLDIR)
        cp -R css $(DESTDIR)/$(INSTALLDIR)/

Debian Directory

In your 'debian' directory you will need to create the following:

changelog:

zaltana-style-core (0.1-1) unstable; urgency=low

  * First release

 -- Zaltana <scottp@dd.com.au>  Thu, 5 Jul 2007 11:30:03 +1100

control: (XXX Fix the version)

Source: zaltana-style-core
Section: zaltana
Priority: extra
Maintainer: Scott Penrose <scottp@dd.com.au>
Standards-Version: 2.1.2.2

Package: zaltana-style-core
Architecture: any
Description: Zaltana Style Core

copyright:

This package was debianized by Scott Penrose scottp@dd.com.au

Copyright:

        Scott Penrose
        http://www.zaltana.org/
        scottp@dd.com.au
        Victoria, Australia

README.debian:

Zaltana
-------

http://www.zaltana.org/

Scott Penrose <scottp@dd.com.au>

rules:

#!/usr/bin/make -f
export DH_COMPAT=1

build: build-stamp
build-stamp:
        dh_testdir
        $(MAKE)
        touch build-stamp

clean:
        dh_testdir
        dh_testroot
        rm -f build-stamp
        -$(MAKE) clean
        dh_clean

install: build
        dh_testdir
        dh_testroot
        dh_clean -k
        dh_installdirs usr/lib
        $(MAKE) install DESTDIR=$(shell pwd)/debian/tmp

# Build architecture-dependent files here.
binary-arch: build install
# We have nothing to do by default.

# Build architecture-independent files here.
binary-indep: build install
        dh_testdir
        dh_testroot
        dh_installdocs debian/copyright
        dh_installmenu
        dh_installinit -r -u 'defaults 99'
        dh_installcron
        dh_installmanpages
        dh_installinfo
        dh_installlogrotate
        dh_link
        dh_strip
        dh_compress
        dh_fixperms
        dh_suidregister
        dh_installdeb
        dh_perl
        dh_shlibdeps
        dh_gencontrol
        dh_md5sums
        dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install

How to build

  • On a debian system with devscripts installed
  • Within the package/trunk directory type debuild -b

Package Naming

We should follow the debian standard, and the Zaltana subversion combinations where possible. E.g.

Versions

Dependencies

We need to be careful on our dependencies to keep the compatibility (for now at least) between the Operating Systems and Versions (Debian, Ubuntu, Nexenta).

Safe dependencies for now...

How to update packages.gz