[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: both native & bytecode



On Wednesday 27 October 2004 16:17, Berke Durak wrote:
> > > I'd suggest:
> > > make builds the native code - ara & xara
> > > make bt builds the bytecode  - ara.bt & xara.bt
> >
> > Sounds reasonable, just keep in mind that some arches do not have a
> > native code compiler, and that the package should fall back on building
> > bytecode in this case.
> >
> > Friendly,
> >
> > Sven Luther
>
> OK done that

Now,
make gives us the native versions
make bt gives us the bytecode

Need to fix the packaging builds per architecture. 

Basically in debian/control I have:
------------------------
Source: ara
Section: utils
Priority: optional
Maintainer: George Danchev <danchev@spnet.net>
Build-Depends: debhelper (>= 4.0.0), ocaml-3.08, liblablgl-ocaml-dev, 
liblablgtk2-ocaml-dev, ocaml-base, ocaml-base-nox, ocaml-interp, 
ocaml-native-compilers, ocaml-nox
Standards-Version: 3.6.1

Package: ara
Architecture: alpha amd64 arm hppa i386 ia64 powerpc sparc
Depends: ${shlibs:Depends}, ocaml-base-3.08
Conflicts: ara-byte
Replaces: ara-byte
Description: A CLI utility for queries on the Debian package database
 ara is a utility for doing boolean regexp queries on the Debian
 package database.
 .
 The database lives, by default, as a text file under the path
 /var/lib/dpkg/available on your Debian installation. It lists all
 packages, installed or not, that are known to your Debian package
 management system.
 .
 ara can perform sophisticated queries on that database. It is possible
 to use any field of the package database as a search criterion and any
 boolean combination thereof.
 .
 This is the CLI version.

Package: ara-byte
Architecture: all
Depends: ${shlibs:Depends}, ocaml-base-3.08
Provides: ara
Conflicts: ara
Replaces: ara
Description: A CLI utility for queries on the Debian package database
 ara is a utility for doing boolean regexp queries on the Debian
 package database.
 .
 The database lives, by default, as a text file under the path
 /var/lib/dpkg/available on your Debian installation. It lists all
 packages, installed or not, that are known to your Debian package
 management system.
 .
 ara can perform sophisticated queries on that database. It is possible
 to use any field of the package database as a search criterion and any
 boolean combination thereof.
 .
 This is the CLI version.

Package: xara-gtk
Architecture: alpha amd64 arm hppa i386 ia64 powerpc sparc
Depends: ${shlibs:Depends}, libatk1.0-0 (>= 1.6.0), libc6 (>= 2.3.2.ds1-4), 
libglib2.0-0 (>= 2.4.6), libgtk2.0-0 (>= 2.4.4), libncurses5 (>= 5.4-1), 
libpango1.0-0 (>= 1.4.1), libpcre3 (>= 4.5), libexpat1, libfontconfig1, 
libfreetype6, libx11-6, libxcursor1, libxext6, libxft2, libxi6, libxrandr2, 
libxrender1, zlib1g
Conflicts: xara-gtk-byte
Relpaces: xara-gtk-byte
Description: A GTK GUI utility for queries on the Debian package database
 ara is a utility for doing boolean regexp queries on the Debian
 package database.
 .
 The database lives, by default, as a text file under the path
 /var/lib/dpkg/available on your Debian installation. It lists all
 packages, installed or not, that are known to your Debian package
 management system.
 .
 ara can perform sophisticated queries on that database. It is possible
 to use any field of the package database as a search criterion and any
 boolean combination thereof.
 .
 This is the GTK2 GUI version.

Package: xara-gtk-byte
Architecture: all
Depends: ${shlibs:Depends}, libatk1.0-0 (>= 1.6.0), libc6 (>= 2.3.2.ds1-4), 
libglib2.0-0 (>= 2.4.6), libgtk2.0-0 (>= 2.4.4), libncurses5 (>= 5.4-1), 
libpango1.0-0 (>= 1.4.1), libpcre3 (>= 4.5), libexpat1, libfontconfig1, 
libfreetype6, libx11-6, libxcursor1, libxext6, libxft2, libxi6, libxrandr2, 
libxrender1, zlib1g
Provides: xara-gtk
Conflicts: xara-gtk
Replaces: xara-gtk
Description: A GTK GUI utility for queries on the Debian package database
 ara is a utility for doing boolean regexp queries on the Debian
 package database.
 .
 The database lives, by default, as a text file under the path
 /var/lib/dpkg/available on your Debian installation. It lists all
 packages, installed or not, that are known to your Debian package
 management system.
 .
 ara can perform sophisticated queries on that database. It is possible
 to use any field of the package database as a search criterion and any
 boolean combination thereof.
 .
 This is the GTK2 GUI version.

-----------------------

AFAIK, I can test whither to build native or bytecode this way:
from debian/rules:

-------
        $(MAKE) bt
        if [ -x /usr/bin/ocamlopt ]; then \
        $(MAKE); \
        fi
-------


Attached is a patch against the current code from svn. Please apply, although 
the install target remains to be fixed. I hope someone to fix it soon at full 
length, because I wont have the spare time to work on till friday morning.

-- 
pub 4096R/0E4BD0AB  2003-03-18  <keyserver.bu.edu ; pgp.mit.edu>
fingerprint 1AE7 7C66 0A26 5BFF DF22 5D55 1C57 0C89 0E4B D0AB 
Index: xara-gtk.files
===================================================================
--- xara-gtk.files	(revision 737)
+++ xara-gtk.files	(working copy)
@@ -1,3 +1,3 @@
 usr/bin/xara
-
-
+usr/share/man/man1/xara.1
+usr/share/doc/xara-gtk/copyright
Index: control
===================================================================
--- control	(revision 737)
+++ control	(working copy)
@@ -2,13 +2,15 @@
 Section: utils
 Priority: optional
 Maintainer: George Danchev <danchev@spnet.net>
-Build-Depends: debhelper (>= 4.0.0), ocaml-3.08, liblablgl-ocaml-dev, liblablgtk2-ocaml-dev, libpcre-ocaml-dev, ocaml, ocaml-base, ocaml-base-nox, ocaml-findlib, ocaml-interp, ocaml-native-compilers, ocaml-nox
+Build-Depends: debhelper (>= 4.0.0), ocaml-3.08, liblablgl-ocaml-dev, liblablgtk2-ocaml-dev, ocaml-base, ocaml-base-nox, ocaml-interp, ocaml-native-compilers, ocaml-nox
 Standards-Version: 3.6.1
 
 Package: ara
-Architecture: any
-Depends: ocaml-base-3.08 ${shlibs:Depends}
-Description: A utility for queries on the Debian package database
+Architecture: alpha amd64 arm hppa i386 ia64 powerpc sparc
+Depends: ${shlibs:Depends}, ocaml-base-3.08
+Conflicts: ara-byte
+Replaces: ara-byte
+Description: A CLI utility for queries on the Debian package database
  ara is a utility for doing boolean regexp queries on the Debian
  package database.
  .
@@ -20,10 +22,68 @@
  ara can perform sophisticated queries on that database. It is possible
  to use any field of the package database as a search criterion and any
  boolean combination thereof.
+ .
+ This is the CLI version.
+ 
+Package: ara-byte
+Architecture: all
+Depends: ${shlibs:Depends}, ocaml-base-3.08
+Provides: ara
+Conflicts: ara
+Replaces: ara
+Description: A CLI utility for queries on the Debian package database
+ ara is a utility for doing boolean regexp queries on the Debian
+ package database.
+ .
+ The database lives, by default, as a text file under the path
+ /var/lib/dpkg/available on your Debian installation. It lists all
+ packages, installed or not, that are known to your Debian package
+ management system.
+ .
+ ara can perform sophisticated queries on that database. It is possible
+ to use any field of the package database as a search criterion and any
+ boolean combination thereof.
+ .
+ This is the CLI version.
 
 Package: xara-gtk
-Architecture: any
-Depends: ${shlibs:Depends}, ocaml-base-3.08, libexpat1, libfontconfig1, libfreetype6, libx11-6, libxcursor1, libxext6, libxft2, libxi6, libxrandr2, libxrender1, zlib1g
-Description: A GTK GUI program to query the Debian package database
- This is a GTK GUI to do complex boolean queries 
- within the Debian package database.
+Architecture: alpha amd64 arm hppa i386 ia64 powerpc sparc
+Depends: ${shlibs:Depends}, libatk1.0-0 (>= 1.6.0), libc6 (>= 2.3.2.ds1-4), libglib2.0-0 (>= 2.4.6), libgtk2.0-0 (>= 2.4.4), libncurses5 (>= 5.4-1), libpango1.0-0 (>= 1.4.1), libpcre3 (>= 4.5), libexpat1, libfontconfig1, libfreetype6, libx11-6, libxcursor1, libxext6, libxft2, libxi6, libxrandr2, libxrender1, zlib1g
+Conflicts: xara-gtk-byte
+Relpaces: xara-gtk-byte
+Description: A GTK GUI utility for queries on the Debian package database
+ ara is a utility for doing boolean regexp queries on the Debian
+ package database.
+ .
+ The database lives, by default, as a text file under the path
+ /var/lib/dpkg/available on your Debian installation. It lists all
+ packages, installed or not, that are known to your Debian package
+ management system.
+ .
+ ara can perform sophisticated queries on that database. It is possible
+ to use any field of the package database as a search criterion and any
+ boolean combination thereof.
+ .
+ This is the GTK2 GUI version.
+
+Package: xara-gtk-byte
+Architecture: all
+Depends: ${shlibs:Depends}, libatk1.0-0 (>= 1.6.0), libc6 (>= 2.3.2.ds1-4), libglib2.0-0 (>= 2.4.6), libgtk2.0-0 (>= 2.4.4), libncurses5 (>= 5.4-1), libpango1.0-0 (>= 1.4.1), libpcre3 (>= 4.5), libexpat1, libfontconfig1, libfreetype6, libx11-6, libxcursor1, libxext6, libxft2, libxi6, libxrandr2, libxrender1, zlib1g
+Provides: xara-gtk
+Conflicts: xara-gtk
+Replaces: xara-gtk
+Description: A GTK GUI utility for queries on the Debian package database
+ ara is a utility for doing boolean regexp queries on the Debian
+ package database.
+ .
+ The database lives, by default, as a text file under the path
+ /var/lib/dpkg/available on your Debian installation. It lists all
+ packages, installed or not, that are known to your Debian package
+ management system.
+ .
+ ara can perform sophisticated queries on that database. It is possible
+ to use any field of the package database as a search criterion and any
+ boolean combination thereof.
+ .
+ This is the GTK2 GUI version.
+
Index: ara.files
===================================================================
--- ara.files	(revision 737)
+++ ara.files	(working copy)
@@ -1,2 +1,3 @@
 usr/bin/ara
 usr/share/man/man1/ara.1
+usr/share/doc/ara/copyright
Index: changelog
===================================================================
--- changelog	(revision 737)
+++ changelog	(working copy)
@@ -1,3 +1,14 @@
+ara (1.0.1) unstable; urgency=low
+
+  * added manpage for xara
+  * added copyright files for ara and xara
+  * added README.Debian files for ara and xara
+  * added changelog files for ara and xara
+  * use dh_md5sums
+  * run make & make opt so we have both the bytecode and native versions
+
+ -- George Danchev <danchev@spnet.net>  Wed, 27 Oct 2004 15:29:47 +0300
+
 ara (1.0-1) unstable; urgency=low
 
   * Initial Release.
Index: rules
===================================================================
--- rules	(revision 737)
+++ rules	(working copy)
@@ -41,7 +41,10 @@
 build-arch-stamp: configure-stamp 
 
 	# Add here commands to compile the arch part of the package.
-	$(MAKE) opt
+	$(MAKE) bt
+	if [ -x /usr/bin/ocamlopt ]; then \
+	$(MAKE); \
+	fi
 	touch build-arch-stamp
 
 build-indep: build-indep-stamp
@@ -80,14 +83,26 @@
 	# debian/tmp.
 #	$(MAKE) install DESTDIR=$(CURDIR)/debian/ara
 
-	cp $(CURDIR)/ara.opt $(CURDIR)/ara
-	cp $(CURDIR)/xara.opt $(CURDIR)/xara
+#	cp $(CURDIR)/ara.opt $(CURDIR)/ara
+#	cp $(CURDIR)/xara.opt $(CURDIR)/xara
 	install -m 755 $(CURDIR)/ara $(CURDIR)/debian/tmp/usr/bin/
+	install -m 755 $(CURDIR)/ara.opt $(CURDIR)/debian/tmp/usr/bin/
 	install -m 644 $(CURDIR)/ara.1 $(CURDIR)/debian/tmp/usr/share/man/man1/
-	gzip -9v $(CURDIR)/debian/tmp/usr/share/man/man1/ara.1	
+	gzip -9v $(CURDIR)/debian/tmp/usr/share/man/man1/ara.1
 
+	cp $(CURDIR)/debian/copyright $(CURDIR)/debian/tmp/usr/share/doc/ara
+	cp $(CURDIR)/debian/changelog $(CURDIR)/debian/tmp/usr/share/doc/ara
+	cp $(CURDIR)/debian/README.Debian $(CURDIR)/debian/tmp/usr/share/doc/ara
+
 	install -m 755 $(CURDIR)/xara $(CURDIR)/debian/xara-gtk/usr/bin/
+	install -m 755 $(CURDIR)/xara.opt $(CURDIR)/debian/xara-gtk/usr/bin/
+	install -m 644 $(CURDIR)/xara.1 $(CURDIR)/debian/xara-gtk/usr/share/man/man1/
+	gzip -9v $(CURDIR)/debian/xara-gtk/usr/share/man/man1/xara.1
 
+	cp $(CURDIR)/debian/copyright $(CURDIR)/debian/xara-gtk/usr/share/doc/xara-gtk
+	cp $(CURDIR)/debian/changelog $(CURDIR)/debian/xara-gtk/usr/share/doc/xara-gtk
+	cp $(CURDIR)/debian/README.Debian $(CURDIR)/debian/xara-gtk/usr/share/doc/xara-gtk
+
 	dh_install -s
 	dh_link
 #	dh_strip
@@ -99,7 +114,7 @@
 	dh_installdeb
 	dh_shlibdeps
 	dh_gencontrol
-#	dh_md5sums -i
+	dh_md5sums
 	dh_builddeb
 	dh_installman
 	
Index: xara-gtk.dirs
===================================================================
--- xara-gtk.dirs	(revision 737)
+++ xara-gtk.dirs	(working copy)
@@ -1,3 +1,3 @@
 usr/bin
 usr/share/doc/xara-gtk
-
+usr/share/man/man1/

Reply to: