Commit 19b5aff0 authored by ctrlsoft-guest's avatar ctrlsoft-guest

Clean up package a bit, add patch for shared library.

parent b92b0de1
tdb (1.1.0-0ubuntu1) unstable; urgency=low
tdb (1.1.0-1) unstable; urgency=low
* New upstream release.
* New maintainer. (Closes: #411687)
......
......@@ -2,8 +2,8 @@ Source: tdb
Section: devel
Priority: optional
Maintainer: Jelmer Vernooij <jelmer@samba.org>
Build-Depends: debhelper (>> 4.0.0)
Standards-Version: 3.6.1
Build-Depends: debhelper (>> 5.0.0), quilt
Standards-Version: 3.7.2
Package: libtdb1
Architecture: any
......@@ -28,7 +28,7 @@ Description: Trivial Database - bundled binaries
This package contains bundled test and utility binaries
Package: tdb-dev
Section: devel
Section: devellibs
Architecture: any
Depends: libc6-dev, libtdb1 (= ${Source-Version})
Description: Trivial Database - development files
......@@ -36,4 +36,4 @@ Description: Trivial Database - development files
of GDBM. TDB features, unlike GDBM, multiple writers support with
appropriate locking and transactions.
.
This package contains development files
This package contains the development files.
diff -ur tdb-1.1.0/Makefile.in tdb-1.1.0-debian/Makefile.in
--- tdb-1.1.0/Makefile.in 2007-05-02 18:09:33.000000000 +0200
+++ tdb-1.1.0-debian/Makefile.in 2007-05-02 19:45:33.000000000 +0200
@@ -27,7 +27,10 @@
DIRS = bin common tools
-all: showflags dirs $(PROGS)
+SONAME = libtdb.so.1.0.0
+SOLIB = libtdb.so.@PACKAGE_VERSION@
+
+all: showflags dirs $(PROGS) $(SOLIB)
showflags:
@echo 'tdb will be compiled with flags:'
@@ -36,11 +39,18 @@
@echo ' LDFLAGS = $(LDFLAGS)'
@echo ' LIBS = $(LIBS)'
+.SUFFIXES: .c .o .po
+
.c.o:
@echo Compiling $*.c
@mkdir -p `dirname $@`
@$(CC) $(CFLAGS) -c $< -o $@
+.c.po:
+ @echo Compiling $*.c
+ @mkdir -p `dirname $@`
+ @$(CC) -fPIC $(CFLAGS) -c $< -o $@
+
dirs:
@mkdir -p $(DIRS)
@@ -52,23 +62,27 @@
cp $(PROGS) $(DESTDIR)$(bindir)
cp $(srcdir)/include/tdb.h $(DESTDIR)$(includedir)
cp tdb.pc $(DESTDIR)$(libdir)/pkgconfig
+ cp libtdb.a $(SOLIB) $(DESTDIR)$(libdir)
libtdb.a: $(TDB_OBJ)
ar -rv libtdb.a $(TDB_OBJ)
-bin/tdbtest$(EXEEXT): tools/tdbtest.o libtdb.a
+$(SOLIB): $(TDB_OBJ:.o=.po)
+ $(CC) -Wl,-soname,$(SONAME) -shared -o $@ $^
+
+bin/tdbtest$(EXEEXT): tools/tdbtest.o $(SOLIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtest tools/tdbtest.o -L. -ltdb -lgdbm
-bin/tdbtool$(EXEEXT): tools/tdbtool.o libtdb.a
+bin/tdbtool$(EXEEXT): tools/tdbtool.o $(SOLIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtool tools/tdbtool.o -L. -ltdb
-bin/tdbtorture$(EXEEXT): tools/tdbtorture.o libtdb.a
+bin/tdbtorture$(EXEEXT): tools/tdbtorture.o $(SOLIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtorture tools/tdbtorture.o -L. -ltdb
-bin/tdbdump$(EXEEXT): tools/tdbdump.o libtdb.a
+bin/tdbdump$(EXEEXT): tools/tdbdump.o $(SOLIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbdump tools/tdbdump.o -L. -ltdb
-bin/tdbbackup$(EXEEXT): tools/tdbbackup.o libtdb.a
+bin/tdbbackup$(EXEEXT): tools/tdbbackup.o $(SOLIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbbackup tools/tdbbackup.o -L. -ltdb
test: bin/tdbtorture$(EXEEXT)
#!/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
ifeq ($(DEB_BUILD_ARCH),i386)
ENABLE_SPINLOCKS=--with-spinlocks --build=i386-pc-linux-gnu
endif
ifeq ($(DEB_BUILD_ARCH),powerpc)
ENABLE_SPINLOCKS=--with-spinlocks
endif
ifeq ($(DEB_BUILD_ARCH),sparc)
ENABLE_SPINLOCKS=--with-spinlocks
CFLAGS = -g -Wall
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
configure: configure-stamp
include /usr/share/quilt/quilt.make
DESTDIR=$(CURDIR)/debian/tmp
configure: patch configure-stamp
configure-stamp:
dh_testdir
CC=gcc CFLAGS="-O2 -s" ./configure --prefix=/usr \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info \
CFLAGS="$(CFLAGS)" ./configure --prefix=/usr \
--disable-dependency-tracking \
--enable-shared \
--enable-static $(ENABLE_SPINLOCKS)
--enable-static
touch configure-stamp
build: configure-stamp build-stamp
......@@ -33,11 +29,12 @@ build-stamp:
$(MAKE)
touch build-stamp
clean:
clean: clean-patched unpatch
clean-patched:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
-$(MAKE) distclean
dh_clean
......@@ -46,22 +43,17 @@ install: build
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/tmp
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
$(MAKE) install DESTDIR=$(DESTDIR)
mv $(CURDIR)/debian/tmp/usr/bin/tdbbackup \
$(CURDIR)/debian/tmp/usr/bin/tdbbackup.tdbtools
dh_movefiles
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
$(CURDIR)/debian/tmp/usr/bin/tdbbackup.tdbtools
dh_install --fail-missing --list-missing --sourcedir=$(DESTDIR)
# Build architecture-dependent files here.
binary-indep:
binary-arch: build install
dh_testdir
dh_testroot
dh_installdocs -ptdb-dev docs/README
dh_installman -ptdb-dev
dh_installdocs
dh_installman
dh_installchangelogs
dh_link
dh_strip
......@@ -74,5 +66,5 @@ binary-arch: build install
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
binary: binary-arch binary-indep
.PHONY: build clean binary-indep binary-arch binary install configure patch unpatch
usr/include/*
usr/lib/pkgconfig/tdb.pc
usr/lib/lib*.a
usr/lib/lib*.la
usr/lib/lib*.so
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment