Date: Sunday, December 18, 2005 @ 11:43:59
Author: csaba
Path: /cvsroot/carob/libmysequoia
Added: debian/changelog (1.1) debian/control (1.1) debian/copyright
(1.1) debian/postinst (1.1) debian/postrm (1.1) debian/rules
(1.1) libmysequoia.spec (1.1)
Modified: Makefile.am (1.1 -> 1.2)
Added scripts to generate debian and redhat packages.
Here are the steps:
1. make dist
# generate the rpm package
2. rpm{build} -ta libmysequoia-0.0.1.tar.gz
# generate the deb package
3. debuild
-------------------+
Makefile.am | 3 +
debian/changelog | 5 ++
debian/control | 14 ++++++++
debian/copyright | 24 ++++++++++++++
debian/postinst | 25 ++++++++++++++
debian/postrm | 21 ++++++++++++
debian/rules | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++
libmysequoia.spec | 56 +++++++++++++++++++++++++++++++++
8 files changed, 235 insertions(+), 1 deletion(-)
Index: libmysequoia/Makefile.am
diff -u libmysequoia/Makefile.am:1.1 libmysequoia/Makefile.am:1.2
--- libmysequoia/Makefile.am:1.1 Sat Dec 17 15:03:46 2005
+++ libmysequoia/Makefile.am Sun Dec 18 11:43:58 2005
@@ -22,7 +22,8 @@
EXTRA_DIST = config/mysql.sh config/createtbl.sh \
config/controller/*.xml config/virtualdatabase/*.xml \
- include/*.hpp
+ include/*.hpp \
+ libmysequoia.spec
LCOV_TMP = lcov_tmp
LCOV_HTML = lcov_html
Index: libmysequoia/debian/changelog
diff -u /dev/null libmysequoia/debian/changelog:1.1
--- /dev/null Sun Dec 18 11:43:59 2005
+++ libmysequoia/debian/changelog Sun Dec 18 11:43:58 2005
@@ -0,0 +1,5 @@
+libmysequoia (0.0.1-1) unstable; urgency=low
+
+ * Initial release.
+
+ -- Csaba Simon <[EMAIL PROTECTED]> Sat, 17 Dec 2005 20:41:35 +0200
Index: libmysequoia/debian/control
diff -u /dev/null libmysequoia/debian/control:1.1
--- /dev/null Sun Dec 18 11:43:59 2005
+++ libmysequoia/debian/control Sun Dec 18 11:43:58 2005
@@ -0,0 +1,14 @@
+Source: libmysequoia
+Priority: optional
+Maintainer: Csaba Simon <[EMAIL PROTECTED]>
+Build-Depends: autotools-dev, liblog4cxx9-dev, doxygen
+Standards-Version: 3.6.2
+
+Package: libmysequoia
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Native MySQL API library using Sequoia
+ Reimplementation of libmysqlclient library, using Carob to benefit from
+ clustering. So, native mysql client programs can use the Sequoia clustering
+ product without changing any line of code in the application.
Index: libmysequoia/debian/copyright
diff -u /dev/null libmysequoia/debian/copyright:1.1
--- /dev/null Sun Dec 18 11:43:59 2005
+++ libmysequoia/debian/copyright Sun Dec 18 11:43:58 2005
@@ -0,0 +1,24 @@
+This package was debianized by Csaba Simon <[EMAIL PROTECTED]> on
+Sat, 17 Dec 2005 20:41:35 +0200.
+
+It was downloaded from http://continuent.org
+
+Copyright Holder: Continuent, Inc
+
+License:
+
+ Sequoia: Database clustering technology.
+ Copyright (C) 2005 Continuent, Inc.
+ Contact: [EMAIL PROTECTED]
+
+ Licensed under the Apache License, Version 2.0 (the "License")
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
Index: libmysequoia/debian/postinst
diff -u /dev/null libmysequoia/debian/postinst:1.1
--- /dev/null Sun Dec 18 11:43:59 2005
+++ libmysequoia/debian/postinst Sun Dec 18 11:43:58 2005
@@ -0,0 +1,25 @@
+#! /bin/sh
+# postinst script for libmysequoia
+#
+
+set -e
+
+# TODO: make the libmysqlclient symbolic links
+
+case "$1" in
+ configure)
+ ldconfig
+
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
Index: libmysequoia/debian/postrm
diff -u /dev/null libmysequoia/debian/postrm:1.1
--- /dev/null Sun Dec 18 11:43:59 2005
+++ libmysequoia/debian/postrm Sun Dec 18 11:43:58 2005
@@ -0,0 +1,21 @@
+#! /bin/sh
+# postrm script for libmysequoia
+#
+
+set -e
+
+# TODO: remove the libmysqlclient symbolic links
+case "$1" in
+
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+ ldconfig
+
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+
+esac
+
+exit 0
Index: libmysequoia/debian/rules
diff -u /dev/null libmysequoia/debian/rules:1.1
--- /dev/null Sun Dec 18 11:43:59 2005
+++ libmysequoia/debian/rules Sun Dec 18 11:43:58 2005
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+
+CXXFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CXXFLAGS += -O0
+else
+ CXXFLAGS += -O2
+endif
+
+define testdir
+ @test -f debian/rules -a -f src/MySQLAPI.cpp || (echo "Not in correct
source directory"; exit 1)
+endef
+
+define testroot
+ @test $$(id -u) = 0 || (echo "Need root privileges"; exit 1)
+endef
+
+# install directories
+DEST_DIR = $(CURDIR)/debian/tmp
+DOCS_DIR = $(DEST_DIR)/usr/share/doc/libmysequoia
+
+configure-stamp:
+ $(testdir)
+ CXXFLAGS="$(CXXFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE)
--build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info
+ touch configure-stamp
+
+build: build-stamp
+
+build-stamp: configure-stamp
+ $(testdir)
+ -rm -f build-stamp
+ $(MAKE)
+ touch build-stamp
+
+clean: configure-stamp
+ $(testdir)
+ -rm -f *-stamp
+ $(MAKE) distclean
+ -rm -rf debian/tmp
+ -rm -f debian/files
+ -rm -f debian/substvars
+
+binary-indep: build
+
+# some handy defs
+MKDIR = install -p -d -o root -g root
+INSTALL = install -c -o root -g root
+
+binary-arch: build
+ $(testdir)
+ $(testroot)
+
+ # install
+ $(MAKE) install DESTDIR=$(DEST_DIR)
+
+ # install documentation
+ $(MKDIR) $(DOCS_DIR)
+ $(INSTALL) -m 644 debian/copyright $(DOCS_DIR)/copyright
+ $(INSTALL) -m 644 debian/changelog $(DOCS_DIR)/changelog.Debian
+ $(INSTALL) -m 644 README $(DOCS_DIR)/README
+ $(INSTALL) -m 644 NEWS $(DOCS_DIR)/NEWS
+
+ # compress it
+ gzip -9 $(DOCS_DIR)/changelog.Debian
+
+ # create the DEBIAN directory
+ $(MKDIR) -m 755 $(DEST_DIR)/DEBIAN
+
+ # install postinst and postrm scripts
+ $(INSTALL) -m 755 debian/postinst $(DEST_DIR)/DEBIAN
+ $(INSTALL) -m 755 debian/postrm $(DEST_DIR)/DEBIAN
+
+ # find out the library dependencies
+ dpkg-shlibdeps ${DEST_DIR}/usr/lib/libmysequoia.so
+
+ # generate control file
+ dpkg-gencontrol -isp -P$(DEST_DIR)
+
+ # generate md5sums
+ cd $(DEST_DIR) && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0'
| xargs -r0 md5sum > DEBIAN/md5sums
+
+ # finally create the package
+ dpkg-deb -b $(DEST_DIR) ../
+
+binary: binary-indep binary-arch
+
+.PHONY: binary binary-arch binary-indep clean build
Index: libmysequoia/libmysequoia.spec
diff -u /dev/null libmysequoia/libmysequoia.spec:1.1
--- /dev/null Sun Dec 18 11:43:59 2005
+++ libmysequoia/libmysequoia.spec Sun Dec 18 11:43:58 2005
@@ -0,0 +1,56 @@
+Summary: Native MySQL API using Sequoia
+Name: libmysequoia
+Version: 0.0.1
+Release: 1
+
+Copyright: Apache License v2.0
+Group: Development/Libraries
+Vendor: Continuent, Inc
+Packager: Csaba Simon <[EMAIL PROTECTED]>
+Url: http://continuent.org/
+
+Source: %name-%version.tar.gz
+
+Prefix: %_prefix
+BuildRoot: %_tmppath/%name-%version-root
+
+%description
+Reimplementation of libmysqlclient library, using Carob to benefit from
+clustering. So, native mysql client programs can use the Sequoia clustering
+product without changing any line of code in the application.
+
+%package devel
+Summary: Native MySQL API using Sequoia, static libraries
+Group: Development/Libraries
+Requires: %name = %version
+
+%description devel
+Reimplementation of libmysqlclient library, using Carob to benefit from
+clustering. So, native mysql client programs can use the Sequoia clustering
+product without changing any line of code in the application.
+
+%prep
+rm -rf $RPM_BUILD_ROOT
+
+%setup
+CXXFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix}
+
+%build
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+make prefix=$RPM_BUILD_ROOT%{prefix} install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,755)
+%attr(755,root,root) %prefix/lib/lib*.so*
+%attr(644,root,root) %prefix/lib/*.la
+
+%files devel
+%defattr(-,root,root,755)
+%attr(644,root,root) %prefix/lib/*.a
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits