Unverified Commit 41a61063 authored by Tachi's avatar Tachi

Use Meson in Debian packaging

parent df5bc509
...@@ -4,7 +4,7 @@ Priority: optional ...@@ -4,7 +4,7 @@ Priority: optional
Maintainer: Kip Warner <kip@thevertigo.com> Maintainer: Kip Warner <kip@thevertigo.com>
Standards-Version: 4.2.1 Standards-Version: 4.2.1
Build-Depends: Build-Depends:
cmake (>= 3.8.0), meson (>= 0.50.0),
cppcheck, cppcheck,
debhelper-compat (= 11), debhelper-compat (= 11),
dh-exec, dh-exec,
...@@ -59,4 +59,3 @@ Description: elegant C++ REST framework ...@@ -59,4 +59,3 @@ Description: elegant C++ REST framework
Pistache is released under the Apache License 2.0 license. Pistache is released under the Apache License 2.0 license.
. .
This package contains the shared library built with SSL support. This package contains the shared library built with SSL support.
...@@ -38,19 +38,18 @@ SOURCE_DIR = $(abspath $(PACKAGE_DIR)/../) ...@@ -38,19 +38,18 @@ SOURCE_DIR = $(abspath $(PACKAGE_DIR)/../)
# Main packaging script based on debhelper 7 syntax. The % is an implicit # Main packaging script based on debhelper 7 syntax. The % is an implicit
# pattern rule that acts as a universal target... # pattern rule that acts as a universal target...
%: %:
dh $@ dh $@ --buildsystem=meson
# Configure source... # Configure source...
override_dh_auto_configure: override_dh_auto_configure:
dh_auto_configure -- \ dh_auto_configure -- \
-G "Unix Makefiles" \ --buildtype=release \
-DCMAKE_BUILD_TYPE=Release \
-DPISTACHE_BUILD_EXAMPLES=true \ -DPISTACHE_BUILD_EXAMPLES=true \
-DPISTACHE_BUILD_TESTS=true \ -DPISTACHE_BUILD_TESTS=true \
-DPISTACHE_ENABLE_NETWORK_TESTS=false \ -DPISTACHE_ENABLE_NETWORK_TESTS=false \
-DPISTACHE_BUILD_DOCS=false \ -DPISTACHE_BUILD_DOCS=false \
-DPISTACHE_USE_SSL=true \ -DPISTACHE_USE_SSL=true \
-DCMAKE_INSTALL_PREFIX=/usr \ --prefix=/usr \
$(SOURCE_DIR) $(SOURCE_DIR)
# Perform unit testing, but only if not disabled... # Perform unit testing, but only if not disabled...
...@@ -70,31 +69,53 @@ endif ...@@ -70,31 +69,53 @@ endif
get-orig-source: $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.bz2 $(info I: $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM)) get-orig-source: $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.bz2 $(info I: $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM))
@ @
## Prepare an upstream vanilla distribution tarball...
#$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.bz2:
# @echo "# Preparing source for $(DEB_SOURCE) v$(DEB_VERSION_UPSTREAM)..."
# cd $(SOURCE_DIR) \
# && cd $(PACKAGE_DIR) \
# && mkdir -p $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM) \
# && cd $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM) \
# && cmake \
# -G "Unix Makefiles" \
# -DCMAKE_BUILD_TYPE=Release \
# -DPISTACHE_BUILD_EXAMPLES=true \
# -DPISTACHE_BUILD_TESTS=true \
# -DPISTACHE_ENABLE_NETWORK_TESTS=false \
# -DPISTACHE_BUILD_DOCS=false \
# -DPISTACHE_USE_SSL=true \
# -DCMAKE_INSTALL_PREFIX=/usr \
# $(SOURCE_DIR) \
# && make dist \
# && mv -v $(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM).tar.bz2 $(SOURCE_DIR)/../$@
# @echo "# Cleaning up..."
# cd $(PACKAGE_DIR)/$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM) \
# && make clean
# cd $(PACKAGE_DIR) \
# && $(RM) -r $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM)
# Prepare an upstream vanilla distribution tarball... # Prepare an upstream vanilla distribution tarball...
$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.bz2: $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.bz2:
@echo "# Preparing source for $(DEB_SOURCE) v$(DEB_VERSION_UPSTREAM)..." @echo "# Preparing source for $(DEB_SOURCE) v$(DEB_VERSION_UPSTREAM)..."
cd $(SOURCE_DIR) \ cd $(SOURCE_DIR) \
&& cd $(PACKAGE_DIR) \ && cd $(PACKAGE_DIR) \
&& mkdir -p $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM) \ && meson setup $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM) \
&& cd $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM) \ --buildtype=release \
&& cmake \
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DPISTACHE_BUILD_EXAMPLES=true \ -DPISTACHE_BUILD_EXAMPLES=true \
-DPISTACHE_BUILD_TESTS=true \ -DPISTACHE_BUILD_TESTS=true \
-DPISTACHE_ENABLE_NETWORK_TESTS=false \ -DPISTACHE_ENABLE_NETWORK_TESTS=false \
-DPISTACHE_BUILD_DOCS=false \ -DPISTACHE_BUILD_DOCS=false \
-DPISTACHE_USE_SSL=true \ -DPISTACHE_USE_SSL=true \
-DCMAKE_INSTALL_PREFIX=/usr \ --prefix=/usr \
$(SOURCE_DIR) \ && cd $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM) \
&& make dist \ && ninja dist \
&& mv -v $(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM).tar.bz2 $(SOURCE_DIR)/../$@ && rm meson-dist/$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM).tar.xz.sha256sum \
&& mv -v meson-dist/$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM).tar.xz $(SOURCE_DIR)/../$@
@echo "# Cleaning up..." @echo "# Cleaning up..."
cd $(PACKAGE_DIR)/$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM) \ cd $(PACKAGE_DIR)/$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM) \
&& make clean && ninja clean
cd $(PACKAGE_DIR) \ cd $(PACKAGE_DIR) \
&& $(RM) -r $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM) && $(RM) -r $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM)
# Targets which aren't actual products... # Targets which aren't actual products...
.PHONY: get-orig-source override_dh_auto_configure override_dh_auto_test .PHONY: get-orig-source override_dh_auto_configure override_dh_auto_test
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