--- treecc-0.3.6.orig/debian/rules +++ treecc-0.3.6/debian/rules @@ -1,59 +1,171 @@ #!/usr/bin/make -f -# Sample debian/rules that uses debhelper. -# GNU copyright 1997 to 1999 by Joey Hess. -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +############################################################################### +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## +############################################################################### + + +## Portions liberally borrowed from: +## http://women.alioth.debian.org/wiki/index.php/English/BuildingWithoutHelper + +## Also borrowed heavily from the 'hello' package + +package = treecc +docdir = debian/tmp/usr/share/doc/$(package) + +CC = gcc +CFLAGS = -g -Wall +INSTALL_PROGRAM = install + +ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O2 +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + + +define checkdir + @test -f debian/rules -a -f main.c || (echo Not in correct source directory; exit 1) +endef + +define checkroot + @test $$(id -u) = 0 || (echo need root priviledges; exit 1) +endef + +# Top directory of the source code (thanks Manoj) +SRCTOP := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi) +# Destination directory where files will be installed +DESTDIR = $(SRCTOP)/debian/$(package) + + +# Definition of directories +BIN_DIR = $(DESTDIR)/usr/bin +SHARE_DIR = $(DESTDIR)/usr/share/treecc +DOCS_DIR = $(DESTDIR)/usr/share/doc/treecc +MAN_DIR = $(DESTDIR)/usr/share/man/man1 -# This is the debhelper compatability version to use. -export DH_COMPAT=4 -DESTDIR=$(CURDIR)/debian/tmp -configure: configure-stamp +## Stamp rules + configure-stamp: - dh_testdir - ./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info + $(checkdir) + ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info touch configure-stamp -build: configure-stamp build-stamp -build-stamp: - dh_testdir +build-stamp: configure-stamp + $(checkdir) + -rm -f build-stamp $(MAKE) touch build-stamp -clean: - dh_testdir - dh_testroot - rm -f build-stamp configure-stamp - -$(MAKE) distclean - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs +## Debian rules + +build: build-stamp + +clean: + $(checkroot) + $(checkdir) + -rm -f *-stamp + -$(MAKE) -i distclean + -rm -rf debian/$(package) + -rm -f debian/files + -rm -f debian/substvars + +binary-indep: build +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +# Definitions for install +INST_OWN = -o root -g root +MAKE_DIR = install -p -d $(INST_OWN) -m 755 +INST_FILE = install -c $(INST_OWN) -m 644 +INST_PROG = $(INSTALL_PROGRAM) -c $(INST_OWN) -m 755 +INST_SCRIPT = install -c $(INST_OWN) -m 755 + + + +binary-arch: build + $(checkdir) + $(checkroot) + + # Install program $(MAKE) install DESTDIR=$(DESTDIR) - dh_installdocs - dh_installinfo - rm -f $$(cat debian/*.info) - dh_installchangelogs ChangeLog - dh_install --list-missing --sourcedir=debian/tmp - dh_strip - dh_compress - dh_fixperms - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - -binary-indep: build install - -binary-arch: build install - dh_testdir - dh_testroot - dh_builddeb -a + + # Run program test suite + $(MAKE) check + + # Install program resources + $(MAKE_DIR) $(SHARE_DIR) + + # Create directory for debian metadata + # This doesn't show up in the final binary .deb as a directory + # We will install various packaging data in here as it is built + $(MAKE_DIR) $(DESTDIR)/DEBIAN + + # Install docs + # The debianchangelog & copyright are always installed + $(MAKE_DIR) $(DOCS_DIR) + $(INST_FILE) debian/copyright $(DOCS_DIR)/copyright + $(INST_FILE) debian/changelog $(DOCS_DIR)/changelog.Debian + $(INST_FILE) ChangeLog $(DOCS_DIR)/changelog + $(INST_FILE) README $(DOCS_DIR)/README + $(INST_FILE) AUTHORS $(DOCS_DIR)/AUTHORS + $(INST_FILE) NEWS $(DOCS_DIR)/NEWS + + # Install package scripts + # The postinst runs after the package is installed, prerm before it is removed + # Details of this are at http://women.alioth.debian.org/wiki/index.php/English/MaintainerScripts + $(INST_SCRIPT) debian/postinst $(DESTDIR)/DEBIAN + $(INST_SCRIPT) debian/prerm $(DESTDIR)/DEBIAN + + # Compress docs + gzip -9 $(DOCS_DIR)/changelog.Debian $(DOCS_DIR)/changelog + gzip -r9 $(DESTDIR)/usr/share/man + gzip -r9 $(DESTDIR)/usr/share/info + + # Work out the shared library dependancies + # This goes into debian/substvars + # See man 1 dpkg-source for details + dpkg-shlibdeps $(package) + + # Generate the control file + # -isp : Includes Section & Priority for each binary package + # -P : Use $(DESTDIR) instead of debian/tmp + dpkg-gencontrol -isp -P$(DESTDIR) + + # Make DEBIAN/md5sums + # The DEBIAN/md5sums file lists the md5sums of each file in the package, excluding files in DEBIAN/ + # These files are used by the debsums package. + + cd $(DESTDIR) && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums + + # Create the .deb package + # This is an ar archive, containing 2 tarballs & a file stating the debian packaging system version + # ar t ~/debian/pbuilder/result/treecc_0.3.6-0ubuntu1_i386.deb + # debian-binary + # control.tar.gz + # data.tar.gz + dpkg-deb -b $(DESTDIR) ../ + + binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure + +.PHONY: binary binary-arch binary-indep clean build \ No newline at end of file --- treecc-0.3.6.orig/debian/changelog +++ treecc-0.3.6/debian/changelog @@ -1,82 +1,6 @@ -treecc (0.3.2-1) unstable; urgency=low +treecc (0.3.6-0ubuntu1) dapper; urgency=low - * New upstream release - * Removed debian/files in upstream release - - -- Russell Stuart Mon, 23 Aug 2004 07:49:34 +1000 - -treecc (0.3.0-1) unstable; urgency=low - - * New upstream release - * Close old ITP/RFP (Closes: #123416) - - -- Andrew Mitchell Sun, 14 Mar 2004 00:21:03 +1300 - -treecc (0.2.8-3) unstable; urgency=low - - * Add texinfo to Build-Depends - - -- Andrew Mitchell Wed, 25 Feb 2004 14:00:03 +1300 - -treecc (0.2.8-2) unstable; urgency=low - - * Fixed email address in debian/control - * Removed old files from debian/ - * Cleaned up debian/rules - - -- Andrew Mitchell Tue, 3 Feb 2004 02:19:08 +1300 - -treecc (0.2.8-1) unstable; urgency=low - - * New upstream release - - -- Andrew Mitchell Sat, 3 Jan 2004 13:19:03 +1300 - -treecc (0.2.6-1) unstable; urgency=low - - * New upstream release - - -- Andrew Mitchell Sat, 26 Jul 2003 17:09:32 +1200 - -treecc (0.2.4-1) unstable; urgency=low - - * New upstream release - - -- Andrew Mitchell Mon, 31 Mar 2003 16:22:42 +1200 - -treecc (0.1.8-1) unstable; urgency=low - - * New upstream release - - -- Andrew Mitchell Sat, 23 Nov 2002 19:33:46 +1300 - -treecc (0.1.2-1) unstable; urgency=low - - * New upstream release - - -- Andrew Mitchell Sat, 29 Jun 2002 18:01:14 +1200 - -treecc (0.1.0-2) unstable; urgency=low - - * Fixed some packaging bugs - - -- Andrew Mitchell Sun, 21 Apr 2002 10:37:30 +1300 - -treecc (0.1.0-1) unstable; urgency=low - - * New upstream release - - -- Andrew Mitchell Sat, 20 Apr 2002 18:01:30 +1300 - -treecc (0.0.6-1) unstable; urgency=low - - * New upstream release - - -- Andrew Mitchell Fri, 18 Jan 2002 18:01:30 +1300 -treecc (0.0.4-1) unstable; urgency=low - - * Initial Release. - - -- Andrew Mitchell Wed, 05 Dec 2001 18:39:43 +1300 + * Initial packaging from scratch + -- Andrew Mitchell Tue, 6 Dec 2005 10:03:34 +1300 --- treecc-0.3.6.orig/debian/control +++ treecc-0.3.6/debian/control @@ -0,0 +1,14 @@ +Source: treecc +Section: devel +Priority: optional +Maintainer: Andrew Mitchell +Build-Depends: flex, bison, texinfo +Standards-Version: 3.6.2 + +Package: treecc +Architecture: any +Depends: ${shlibs:Depends} +Description: Manages code generation for compiler development + The treecc program is designed to assist in the development of compilers + and other language-based tools. It manages the generation of code to handle + abstract syntax trees and operations upon the trees. --- treecc-0.3.6.orig/debian/README.Debian +++ treecc-0.3.6/debian/README.Debian @@ -1,35 +0,0 @@ -treecc ------- - -Warning: - These are NOT the official Debian packages. The official - packages are maintained by Andrew Mitchell, and are part - of Debian. These packages will probably disappear in time. - -The treecc program is used by PNet to help compilers and other -language-based tools. It manages the generation of code to -handle abstract syntax trees and operations upon the trees. - -PNet is part of the DotGNU effort. DotGNU aims to provide -free toolkit that targets the same areas as Microsofts' .NET -platform. - -You can file DotGNUs' home page here: - http://www.dotgnu.org - -It was built from this source tarball: - http://www.southern-storm.com.au/download/treecc-VERSION.tar.gz - - -Note to package Debian maintainers: - - Most of the files in the debian/ directory are created by the - build-debian-packages.sh script which is in the root directory - of the sources. This script uses the information in the rpm - .spec file to create the equivelent control files in debian. - This means I only have to maintain one set of descriptions, - file lists, and so on. - - Look at the comments in that script for more information. - - -- Russell Stuart Sat, 4 Sep 2004 05:08:17 +1000 --- treecc-0.3.6.orig/debian/copyright +++ treecc-0.3.6/debian/copyright @@ -0,0 +1,44 @@ +This package was debianized by Andrew Mitchell on +Fri, 19 Oct 2001 18:39:43 +1300. + +It was downloaded from http://www.southern-storm.com.au/ + +Upstream Author: Southern Storm Software, Pty Ltd + +Copyright: + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in /usr/share/common-licenses/GPL file. + +However, it is not our intention to restrict the use of treecc to only +free software providers. Use by commercial software vendors is welcome. + +When you use treecc on your own input files to generate source code as +output, the resulting source code files are also owned by you. You may +re-distribute unmodified copies of these output source files, and any +binaries derived from them, in any way you see fit. + +If you modify treecc itself, and generate new output files as a result, +then you must release all modifications to treecc with your program so +that other users can benefit from your changes under the terms of the GPL. + +Contact the authors if you have any questions regarding the above. +It is our intention to allow the same amount of access to treecc output +files as is currently available using the GNU Bison and Flex programs. + + + --- treecc-0.3.6.orig/debian/control~ +++ treecc-0.3.6/debian/control~ @@ -0,0 +1,14 @@ +Source: treecc +Section: devel +Priority: optional +Maintainer: Andrew Mitchell +Build-Depends: flex, bison, texinfo +Standards-Version: 3.6.1 + +Package: treecc +Architecture: any +Depends: libc6 (>= 2.3.4-1) +Description: Manages code generation for compiler development + The treecc program is designed to assist in the development of compilers + and other language-based tools. It manages the generation of code to handle + abstract syntax trees and operations upon the trees. --- treecc-0.3.6.orig/debian/rules~ +++ treecc-0.3.6/debian/rules~ @@ -0,0 +1,153 @@ +#!/usr/bin/make -f + +############################################################################### +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## +############################################################################### + + +## Portions liberally borrowed from: +## http://women.alioth.debian.org/wiki/index.php/English/BuildingWithoutHelper + +## Also borrowed heavily from the 'hello' package + +package = treecc +docdir = debian/tmp/usr/share/doc/$(package) + +CC = gcc +CFLAGS = -g -Wall +INSTALL_PROGRAM = install + +ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O2 +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + + +define checkdir + @test -f debian/rules -a -f main.c || (echo Not in correct source directory; exit 1) +endef + +define checkroot + @test $$(id -u) = 0 || (echo need root priviledges; exit 1) +endef + +# Top directory of the source code (thanks Manoj) +SRCTOP := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi) +# Destination directory where files will be installed +DESTDIR = $(SRCTOP)/debian/$(package) + + +# Definition of directories +BIN_DIR = $(DESTDIR)/usr/bin +SHARE_DIR = $(DESTDIR)/usr/share/treecc +DOCS_DIR = $(DESTDIR)/usr/share/doc/treecc +MAN_DIR = $(DESTDIR)/usr/share/man/man1 + + + +## Stamp rules + +configure-stamp: + $(checkdir) + ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info + touch configure-stamp + +build-stamp: configure-stamp + $(checkdir) + -rm -f build-stamp + $(MAKE) + touch build-stamp + +## Debian rules + +build: build-stamp + +clean: + $(checkroot) + $(checkdir) + -rm -f *-stamp + -$(MAKE) -i distclean + -rm -rf debian/$(package) + -rm -f debian/files + -rm -f debian/substvars + +binary-indep: build +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +# Definitions for install +INST_OWN = -o root -g root +MAKE_DIR = install -p -d $(INST_OWN) -m 755 +INST_FILE = install -c $(INST_OWN) -m 644 +INST_PROG = $(INSTALL_PROGRAM) -c $(INST_OWN) -m 755 +INST_SCRIPT = install -c $(INST_OWN) -m 755 + + + +binary-arch: build + $(checkdir) + $(checkroot) + + # Install program + $(MAKE) install DESTDIR=$(DESTDIR) LIBTOOL=libtool + + + # Install program resources + $(MAKE_DIR) $(SHARE_DIR) + + # Create directory for debian metadata + $(MAKE_DIR) $(DESTDIR)/DEBIAN + + # Install docs + $(MAKE_DIR) $(DOCS_DIR) + $(INST_FILE) debian/copyright $(DOCS_DIR)/copyright + $(INST_FILE) debian/changelog $(DOCS_DIR)/changelog.Debian + $(INST_FILE) ChangeLog $(DOCS_DIR)/changelog + $(INST_FILE) README $(DOCS_DIR)/README + $(INST_FILE) AUTHORS $(DOCS_DIR)/AUTHORS + $(INST_FILE) NEWS $(DOCS_DIR)/NEWS + + # Install package scripts + $(INST_SCRIPT) debian/postinst $(DESTDIR)/DEBIAN + $(INST_SCRIPT) debian/postrm $(DESTDIR)/DEBIAN + + # Compress docs + gzip -9 $(DOCS_DIR)/changelog.Debian $(DOCS_DIR)/changelog + gzip -r9 debian/tmp/usr/share/man + gzip -9 debian/tmp/usr/share/info/* + + # Work out the shared library dependancies + # This goes into + dpkg-shlibdeps $(package) + + # Generate the control file (thanks Helen) + dpkg-gencontrol -isp -P$(DESTDIR) + + # Make DEBIAN/md5sums (thanks Helen) + cd $(DESTDIR) && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums + + # Create the .deb package (thanks Helen) + dpkg-deb -b $(DESTDIR) ../ + + + +binary: binary-indep binary-arch + +.PHONY: binary binary-arch binary-indep clean build \ No newline at end of file --- treecc-0.3.6.orig/debian/postinst +++ treecc-0.3.6/debian/postinst @@ -0,0 +1,13 @@ +#!/bin/sh + +# How this can be called +# (from http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#s-mscriptsinstact) +# * postinst configure most-recently-configured-version +# * old-postinst abort-upgrade new-version +# * conflictor's-postinst abort-remove in-favour package new-version +# * deconfigured's-postinst abort-deconfigure in-favour failed-install-package version removing conflicting-package version +# This is currently incomplete, as it assumes that configure is being run to update the info database + +set -e +install-info --quiet --section Development Development \ + /usr/share/info/treecc.info \ No newline at end of file --- treecc-0.3.6.orig/debian/prerm +++ treecc-0.3.6/debian/prerm @@ -0,0 +1,3 @@ +#!/bin/sh +set -e +install-info --quiet --remove /usr/share/info/prerm.info --- treecc-0.3.6.orig/debian/copyright~ +++ treecc-0.3.6/debian/copyright~ @@ -0,0 +1,30 @@ +This package was debianized by Andrew Mitchell on +Fri, 19 Oct 2001 18:39:43 +1300. + +It was downloaded from http://www.southern-storm.com.au/ + +Upstream Author: Southern Storm Software, Pty Ltd + +Copyright: +Treecc is distributed under the terms of the GNU General Public License. +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in /usr/share/common-licenses/GPL file. + +However, it is not our intention to restrict the use of treecc to only +free software providers. Use by commercial software vendors is welcome. + +When you use treecc on your own input files to generate source code as +output, the resulting source code files are also owned by you. You may +re-distribute unmodified copies of these output source files, and any +binaries derived from them, in any way you see fit. + +If you modify treecc itself, and generate new output files as a result, +then you must release all modifications to treecc with your program so +that other users can benefit from your changes under the terms of the GPL. + +Contact the authors if you have any questions regarding the above. +It is our intention to allow the same amount of access to treecc output +files as is currently available using the GNU Bison and Flex programs. + + + --- treecc-0.3.6.orig/debian/postinst~ +++ treecc-0.3.6/debian/postinst~ @@ -0,0 +1,4 @@ +#!/bin/sh +set -e +install-info --quiet --section Development Development \ + /usr/share/info/treecc.info \ No newline at end of file