diff options
author | Roger Leigh <rleigh@debian.org> | 2013-09-23 22:04:06 +0100 |
---|---|---|
committer | Roger Leigh <rleigh@debian.org> | 2013-09-29 16:45:34 +0100 |
commit | a4093eeb57237c663ad2a4b6347d1b8820784678 (patch) | |
tree | 90850fca73df1f46d56f87e7b250d5257b9e7df6 | |
parent | 79c796e02773b5131bf38157366039a799e3881b (diff) | |
download | schroot-a4093eeb57237c663ad2a4b6347d1b8820784678.tar.gz |
debian: Build using cmake
-rw-r--r-- | debian/control | 14 | ||||
-rw-r--r-- | debian/libsbuild-1.7.0.install.in | 1 | ||||
-rw-r--r-- | debian/libsbuild-1.7.1.install.in | 1 | ||||
-rwxr-xr-x | debian/rules | 51 |
4 files changed, 37 insertions, 30 deletions
diff --git a/debian/control b/debian/control index 82ee1970..83d6a097 100644 --- a/debian/control +++ b/debian/control @@ -40,13 +40,13 @@ Description: common files for schroot This package provides translations for localisation of schroot programs. -Package: libsbuild-1.7.0 +Package: libsbuild-1.7.1 Architecture: any Section: libs Pre-Depends: multiarch-support Depends: ${shlibs:Depends}, ${misc:Depends}, -Suggests: libsbuild-1.7.0-dbg +Suggests: libsbuild-1.7.1-dbg Description: shared library for the Debian source builder libsbuild provides facilities to manage and access chroots, as part of schroot. @@ -65,11 +65,11 @@ Package: libsbuild-dev Architecture: any Section: libdevel Depends: - ${shlibs:Depends}, ${misc:Depends}, - libsbuild-1.7.0 (= ${binary:Version}), + ${misc:Depends}, + libsbuild-1.7.1 (= ${binary:Version}), pkg-config (>= 0.14.0) Suggests: - libsbuild-1.7.0-dbg, + libsbuild-1.7.1-dbg, libsbuild-doc Description: development files for the Debian source builder libsbuild provides facilities to manage and access chroots, as part of @@ -86,13 +86,13 @@ Description: development files for the Debian source builder This package contains the header files needed to develop applications which make use of sbuild. -Package: libsbuild-1.7.0-dbg +Package: libsbuild-1.7.1-dbg Architecture: any Section: debug Priority: extra Depends: ${misc:Depends}, - libsbuild-1.7.0 (= ${binary:Version}), + libsbuild-1.7.1 (= ${binary:Version}), Conflicts: schroot-dbg Description: Debugging symbols for the Debian source builder diff --git a/debian/libsbuild-1.7.0.install.in b/debian/libsbuild-1.7.0.install.in deleted file mode 100644 index 7faa9113..00000000 --- a/debian/libsbuild-1.7.0.install.in +++ /dev/null @@ -1 +0,0 @@ -debian/install/@LIBDIR@/libsbuild-*.so @LIBDIR@ diff --git a/debian/libsbuild-1.7.1.install.in b/debian/libsbuild-1.7.1.install.in new file mode 100644 index 00000000..11230bde --- /dev/null +++ b/debian/libsbuild-1.7.1.install.in @@ -0,0 +1 @@ +debian/install/@LIBDIR@/libsbuild.so.* @LIBDIR@ diff --git a/debian/rules b/debian/rules index d88422d2..c8d110fd 100755 --- a/debian/rules +++ b/debian/rules @@ -8,11 +8,11 @@ LIBDIR = usr/lib/$(DEB_HOST_MULTIARCH) LIBEXECDIR = $(LIBDIR)/schroot ifneq ($(DEB_HOST_ARCH_OS),linux) - LVMSNAP_OPTIONS = --disable-lvm-snapshot - BTRFSSNAP_OPTIONS = --disable-btrfs-snapshot + LVMSNAP_OPTIONS = -Dlvm-snapshot=OFF + BTRFSSNAP_OPTIONS = -Dbtrfs-snapshot=OFF else - LVMSNAP_OPTIONS = --enable-lvm-snapshot - BTRFSSNAP_OPTIONS = --enable-btrfs-snapshot + LVMSNAP_OPTIONS = -Dlvm-snapshot=ON + BTRFSSNAP_OPTIONS = -Dbtrfs-snapshot=ON endif CFLAGS = -Wall -g @@ -23,7 +23,7 @@ else CFLAGS += -O2 endif -DH_OPTIONS = --with autotools_dev --builddirectory=debian/build --parallel +DH_OPTIONS = --buildsystem=cmake --builddirectory=debian/build --parallel ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) @@ -39,24 +39,31 @@ DH_INSTALL_FILES = $(basename $(wildcard debian/*.install.in)) %.install: %.install.in sed -e 's;@LIBDIR@;$(LIBDIR);g' -e 's;@LIBEXECDIR@;$(LIBEXECDIR);g' <$< >$@ -override_dh_auto_configure: debian/build/config.status +override_dh_auto_configure: debian/build/CMakeCache.txt debian/build/gtest/libgtest.a: mkdir -p $(dir $@) cd $(dir $@) ; \ CXX="g++ -std=c++11" cmake /usr/src/gtest ; \ - make VERBOSE=1 - -debian/build/config.status: configure debian/build/gtest/libgtest.a - dh_auto_configure -- \ - --enable-dchroot --enable-dchroot-dsa \ - --with-bash-completion-dir=/etc/bash_completion.d \ - $(LVMSNAP_OPTIONS) $(BTRFSSNAP_OPTIONS) \ - BTRFS=/sbin/btrfs \ - LVCREATE=/sbin/lvcreate \ - LVREMOVE=/sbin/lvremove \ - CXX='g++ -std=gnu++11' \ - GTEST_ROOT="$(CURDIR)/debian/build/gtest" + $(MAKE) VERBOSE=1 + +debian/build/CMakeCache.txt: CMakeLists.txt debian/build/gtest/libgtest.a + mkdir -p $(dir $@) + cd $(dir $@) ; \ + CXX="g++ -std=c++11" \ + GTEST_ROOT="$(CURDIR)/debian/build/gtest" \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_SYSCONFDIR=/etc \ + -DCMAKE_INSTALL_LOCALSTATEDIR=/var \ + -DCMAKE_INSTALL_LIBEXECDIR=lib \ + -DSCHROOT_LIBEXEC_DIR=/$(LIBDIR)/schroot \ + -Ddebug=OFF -Ddchroot=ON -Ddchroot-dsa=ON \ + -Dbash_completion_dir=/etc/bash_completion.d \ + $(LVMSNAP_OPTIONS) $(BTRFSSNAP_OPTIONS) \ + -DBTRFS_EXECUTABLE=/sbin/btrfs \ + -DLVCREATE_EXECUTABLE=/sbin/lvcreate \ + -DLVREMOVE_EXECUTABLE=/sbin/lvremove \ + $(CURDIR) dh_testdir override_dh_auto_clean: @@ -67,10 +74,10 @@ override_dh_auto_clean: override_dh_auto_build: ifneq (,$(shell dh_listpackages -a 2>/dev/null)) - $(MAKE) -C debian/build all V=1 PO4A= + $(MAKE) -C debian/build all VERBOSE=1 endif ifneq (,$(shell dh_listpackages -i 2>/dev/null)) - $(MAKE) -C debian/build doc V=1 PO4A= + $(MAKE) -C debian/build doc VERBOSE=1 endif override_dh_auto_test: @@ -94,7 +101,7 @@ install-arch: build-arch $(DH_INSTALL_FILES) rm -rf $(CURDIR)/debian/dchroot-dsa/usr/share/doc/dchroot-dsa ln -sf schroot $(CURDIR)/debian/dchroot-dsa/usr/share/doc/dchroot-dsa # Requires fakeroot, so tests need running here. - dh_auto_test + $(MAKE) -C debian/build test ARGS=-V install-indep: build-indep $(DH_INSTALL_FILES) dh $@ $(DH_OPTIONS) @@ -120,6 +127,6 @@ override_dh_installinit: dh_installinit --no-start --update-rcd-params='defaults' override_dh_strip: - dh_strip --dbg-package=libsbuild-1.7.0-dbg + dh_strip --dbg-package=libsbuild-1.7.1-dbg .PHONY: override_dh_auto_configure override_dh_auto_clean override_dh_auto_build override_dh_auto_test override_dh_auto_install override_dh_installchangelogs override_dh_installinit override_dh_strip install-arch install-indep |