Hi,

I found Autopackage [1] helpful to generate GNU/Linux portable
binaries that work independently of the distribution.

I used it to create a CVS package, here's the spec file.


The package is created by installing the developper tools [2] and
typing 'makeinstaller'. It creates a self-extracting .package file.

Cheers,

-- 
Sylvain
[1] http://www.autopackage.org/
[2] http://autopackage.org/download-tools.html
Add an autopackage spec file
Index: ccvs/autopackage/Makefile
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ ccvs/autopackage/Makefile	2007-05-13 09:16:02.000000000 +0000
@@ -0,0 +1,3 @@
+VERSION=$(shell grep 'AC_INIT' ../configure.in | grep -o -E '[0-9]\.[0-9]+\.[0-9]+')
+quick-configure:
+	sed -e 's/@VERSION@/$(VERSION)/' default.apspec.in > default.apspec
Index: ccvs/autopackage/default.apspec.in
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ ccvs/autopackage/default.apspec.in	2007-05-13 10:17:39.000000000 +0000
@@ -0,0 +1,116 @@
+# -*-shell-script-*-
+
+[Meta]
+RootName: @cvs.nongnu.org/cvs:$SOFTWAREVERSION
+DisplayName: Concurrent Versions System
+ShortName: cvs
+Maintainer: Larry Jones, Derek R. Price <[EMAIL PROTECTED]>, Mark D. Baushke <[EMAIL PROTECTED]>
+Packager: Sylvain Beucler <[EMAIL PROTECTED]>
+Summary: CVS is a version control system.
+URL: http://cvs.nongnu.org/
+License: GNU General Public License, Version 2 or later
+SoftwareVersion: @VERSION@
+#Repository: http://www.mysite.org/downloads/myproject.xml
+
+# If you change the autopackage but not the software itself,
+# increment this number.
+
+# PackageVersion: 2
+
+# This is the version of the autopackage runtime this package is
+# written for. Increasing this number implies you have read the
+# "Migrating to 1.X" document and understand the impact it will have
+# on your package. Some APIs may change their behaviour and new
+# features will be enabled depending on what this is set to.
+AutopackageTarget: 1.2
+
+# Only uncomment InterfaceVersion if your package exposes interfaces
+# to other software, for instance if it includes DSOs or python/perl
+# modules. See the developer guide for more info, or ask on
+# autopackage-dev if you aren't sure about interface versioning.
+#
+# InterfaceVersion: 0.0
+
+[BuildPrepare]
+# For ./configure based systems this is a good default
+#prepareBuild --with-some-feature
+
+# --sysconfdir=/etc    # defaults to $prefix/etc/
+# --with-external-zlib # default to internal zlib, less easy to maintain security
+# --enable-pam         # not enabled by default
+# --without-krb4 --without-gssapi # Done in Debian (?)
+prepareBuild --sysconfdir=/etc --without-krb4 --without-gssapi \
+    --with-external-zlib --enable-pam
+
+[BuildUnprepare]
+unprepareBuild
+
+[Globals]
+# Anything put here will be run during makeinstall and at
+# install/uninstall time. Define useful variables here:
+
+# export MY_VAR=1
+
+[Imports]
+# You may wish to delete some things first, eg libtool .la files or
+# development files (headers)
+
+# rm -r include
+# rm libs/*.la
+
+# This imports every file in
+# (ie, that is installed by "make install")
+echo '*' | import
+
+
+[Prepare]
+# Dependency checking
+
+# You can use "require" and "recommend". They both try to find the
+# given dependency, and install it if missing. But require will return
+# 1 (causing failure) if it can't do that whereas recommend will
+# simply show a notice at the end of the install.
+
+# The second argument here identifies a skeleton file, which is
+# a file that encapsulates a dependency check. The second number
+# identifies the interface version you need. Use as many of these
+# as you need.
+
+#require @whatever.you/need 1.0
+
+# The user may have already installed the program from an RPM.
+# Let's try and uninstall it first. We only need one call if 3rd party
+# packages have split the program up into multiple packages.
+
+removeOwningPackage $PREFIX/bin/cvs
+
+[Install]
+# Put your installation script here. See the quickstart guide on
+# the website for an API cheat-sheet
+# installExe bin/*
+linkFile ../share/cvs/contrib/rcs2log bin/rcs2log
+installExe bin/*
+
+# For newer versions of autotools:
+installInfo share/info/*
+# For old versions of autotools:
+installInfo info/*
+
+# For newer versions of autotools:
+installMan 1 share/man/man1/cvs.1
+installMan 5 share/man/man5/cvs.5
+installMan 8 share/man/man8/cvsbug.8
+# For old versions of autotools:
+installMan 1 man/man1/cvs.1
+installMan 5 man/man5/cvs.5
+installMan 8 man/man8/cvsbug.8
+# Alternatively?
+#copyFiles share/man "$PREFIX/share"
+#installData share/man
+
+#copyFiles share/cvs "$PREFIX/share/"
+installData share/cvs
+
+[Uninstall]
+# Usually just the following line is enough to uninstall everything
+uninstallFromLog
Index: ccvs/configure.in
===================================================================
--- ccvs.orig/configure.in	2005-10-03 15:56:14.000000000 +0000
+++ ccvs/configure.in	2007-05-13 09:16:02.000000000 +0000
@@ -1574,7 +1574,8 @@ AC_CONFIG_FILES([Makefile \
 	  vms/Makefile \
 	  windows-NT/Makefile \
 	  windows-NT/SCC/Makefile \
-	  zlib/Makefile])
+	  zlib/Makefile \
+	  autopackage/default.apspec])
 
 dnl and we're done
 AC_OUTPUT
_______________________________________________
Bug-cvs mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/bug-cvs

Reply via email to