164 lines
5.5 KiB
Makefile
164 lines
5.5 KiB
Makefile
#!/usr/bin/make -f
|
|
|
|
DEB_BUILDDIR = debian/build
|
|
DEB_MAKE_DESTDIRSKEL = $(CURDIR)/debian/install/@FLAVOR@
|
|
DEB_MAKE_FLAVORS = shared shared_udeb static
|
|
DISABLE_UPDATE_UPLOADERS = 1
|
|
|
|
include /usr/share/cdbs/1/rules/debhelper.mk
|
|
include /usr/share/cdbs/1/rules/utils.mk
|
|
include /usr/share/cdbs/1/class/gnome.mk
|
|
include /usr/share/gnome-pkg-tools/1/rules/clean-la.mk
|
|
include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk
|
|
include /usr/share/gnome-pkg-tools/1/rules/check-dist.mk
|
|
include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk
|
|
|
|
GNOME_MODULE = gtk+
|
|
|
|
# ppc64 support; see #386815
|
|
ifeq ($(DEB_HOST_GNU_CPU),powerpc64)
|
|
CFLAGS += -mminimal-toc
|
|
endif
|
|
|
|
# default LDFLAGS; these can be expanded with $(call flavor_get, )
|
|
# currently fails in the cups gtkprint backend
|
|
#LDFLAGS += -Wl,-z,defs
|
|
|
|
DEBVERSION := $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p')
|
|
VERSION := $(shell echo $(DEBVERSION) | sed -e 's/-[^-]*$$//')
|
|
APIVER := 3.0
|
|
SONAME := 0
|
|
SHVER := 2.99.0
|
|
|
|
ifneq (,$(findstring multiarch,$(DEB_BUILD_OPTIONS)))
|
|
LIBDIR := usr/lib/$(DEB_HOST_GNU_TYPE)
|
|
else
|
|
LIBDIR := usr/lib
|
|
endif
|
|
|
|
# earliest version that this release has backwards binary compatibility for
|
|
GTK_BINARY_VERSION := 3.0.0
|
|
|
|
# Gtk binary version virtual Provide
|
|
GTK_BINVER_DEP := gtk$(APIVER)-binver-$(GTK_BINARY_VERSION)
|
|
|
|
# relative base directory for all types of modules
|
|
MODULES_BASE_PATH := $(LIBDIR)/gtk-$(APIVER)/$(GTK_BINARY_VERSION)
|
|
|
|
# package names
|
|
SHARED_PKG := libgtk$(APIVER)-$(SONAME)
|
|
COMMON_PKG := libgtk$(APIVER)-common
|
|
DEV_PKG := libgtk$(APIVER)-dev
|
|
UDEB_PKG := $(SHARED_PKG)-udeb
|
|
DOC_PKG := libgtk$(APIVER)-doc
|
|
BIN_PKG := libgtk$(APIVER)-bin
|
|
DEBUG_PKG := $(SHARED_PKG)-dbg
|
|
EXAMPLES_PKG := gtk$(APIVER)-examples
|
|
PIXBUF_PKG := gtk3-engines-pixbuf
|
|
|
|
|
|
# temporary directory for the minimal MIME cache generation
|
|
mimedir = debian/build-mime
|
|
mimexml = /usr/share/mime/packages/freedesktop.org.xml
|
|
|
|
DEB_CONFIGURE_EXTRA_FLAGS = \
|
|
--libdir=/$(LIBDIR) \
|
|
--enable-test-print-backend \
|
|
--enable-xinput
|
|
|
|
DEB_CONFIGURE_FLAGS_shared = \
|
|
--enable-shared \
|
|
--enable-introspection=yes \
|
|
--disable-static
|
|
|
|
DEB_CONFIGURE_FLAGS_shared_udeb = \
|
|
--enable-introspection=no \
|
|
--disable-xcomposite \
|
|
--disable-xdamage \
|
|
--disable-xfixes \
|
|
--disable-xrandr
|
|
|
|
DEB_CONFIGURE_FLAGS_static = \
|
|
--with-included-loaders=yes \
|
|
--enable-introspection=no \
|
|
--disable-modules \
|
|
--disable-shared \
|
|
--enable-static
|
|
|
|
DEB_MAKE_CHECK_TARGET = -k check || true
|
|
DEB_COMPRESS_EXCLUDE += .devhelp
|
|
DEB_INSTALL_DOCS_$(DOC_PKG) += -X.in
|
|
DEB_DH_MAKESHLIBS_ARGS_ALL += -X$(MODULES_BASE_PATH)
|
|
DEB_DH_MAKESHLIBS_ARGS_$(SHARED_PKG) += -V --add-udeb=$(UDEB_PKG) -- -c4
|
|
DEB_DH_MAKESHLIBS_ARGS_libgail3.0-0 += -V"libgail3.0-0 (>= $(SHVER)), libgail3.0-common (>= $(SHVER))" -- -c4
|
|
DEB_DH_FIXPERMS_ARGS_ALL += -X$(LIBDIR)/$(SHARED_PKG)
|
|
DEB_DH_STRIP_ARGS = --dbg-package=$(if $(findstring libgail,$(cdbs_curpkg)),libgail3.0-0-dbg,$(DEBUG_PKG))
|
|
DEB_DH_STRIP_ARGS_$(UDEB_PKG) =
|
|
|
|
# macro computing the list of 'debian/<pkg>.*" files which have a
|
|
# corresponding ".in" file; pass the list of packages in $(1)
|
|
dh_subst_files = $(patsubst %.in,%,$(wildcard $(addprefix debian/, $(addsuffix *.in, $(1)))))
|
|
|
|
debian/%: debian/%.in
|
|
dh_testdir
|
|
sed \
|
|
-e "s#@SONAME@#$(SONAME)#g" \
|
|
-e "s#@APIVER@#$(APIVER)#g" \
|
|
-e "s#@VERSION@#$(VERSION)#g" \
|
|
-e "s#@GTK_BINVER_DEP@#$(GTK_BINVER_DEP)#g" \
|
|
-e "s#@SHARED_PKG@#$(SHARED_PKG)#g" \
|
|
-e "s#@COMMON_PKG@#$(COMMON_PKG)#g" \
|
|
-e "s#@DEV_PKG@#$(DEV_PKG)#g" \
|
|
-e "s#@UDEB_PKG@#$(UDEB_PKG)#g" \
|
|
-e "s#@DOC_PKG@#$(DOC_PKG)#g" \
|
|
-e "s#@BIN_PKG@#$(BIN_PKG)#g" \
|
|
-e "s#@DEBUG_PKG@#$(DEBUG_PKG)#g" \
|
|
-e "s#@EXAMPLES_PKG@#$(EXAMPLES_PKG)#g" \
|
|
-e "s#@PIXBUF_PKG@#$(PIXBUF_PKG)#g" \
|
|
-e "s#@GNOME_TEAM@#$(UPLOADERS)#g" \
|
|
-e "s#@GTK_BINARY_VERSION@#$(GTK_BINARY_VERSION)#g" \
|
|
-e "s#@LIBDIR@#$(LIBDIR)#g" \
|
|
-e 's#@OPTLIBDIR@#$(OPTLIBDIR)#g' \
|
|
-e "s#@MODULES_BASE_PATH@#$(MODULES_BASE_PATH)#g" \
|
|
$@.in > $@
|
|
|
|
clean:: debian/control
|
|
# gross kludge to force control generation with the %.in target
|
|
touch debian/control.in
|
|
rm -rf $(mimedir)
|
|
rm -f $(call dh_subst_files,$(DEB_ALL_PACKAGES))
|
|
|
|
# Add dependencies to generate files from the debian/*.in ones
|
|
build-indep: $(call dh_subst_files,$(DEB_INDEP_PACKAGES))
|
|
build-arch: $(call dh_subst_files,$(DEB_ARCH_PACKAGES))
|
|
|
|
binary-install/$(DEV_PKG)::
|
|
# Install the binaries with a -3.0 suffix
|
|
mv debian/$(DEV_PKG)/usr/bin/gtk-builder-convert \
|
|
debian/$(DEV_PKG)/usr/bin/gtk-builder-convert-$(APIVER)
|
|
mv debian/$(DEV_PKG)/usr/share/man/man1/gtk-builder-convert.1 \
|
|
debian/$(DEV_PKG)/usr/share/man/man1/gtk-builder-convert-$(APIVER).1
|
|
|
|
binary-install/$(SHARED_PKG)::
|
|
# Install the binaries with a -3.0 suffix
|
|
mv debian/$(SHARED_PKG)/$(LIBDIR)/$(SHARED_PKG)/gtk-update-icon-cache \
|
|
debian/$(SHARED_PKG)/$(LIBDIR)/$(SHARED_PKG)/gtk-update-icon-cache-$(APIVER)
|
|
|
|
binary-install/$(BIN_PKG)::
|
|
# Install the binaries with a -3.0 suffix
|
|
mv debian/$(BIN_PKG)/usr/share/man/man1/gtk-update-icon-cache.1 \
|
|
debian/$(BIN_PKG)/usr/share/man/man1/gtk-update-icon-cache-$(APIVER).1
|
|
|
|
binary-install/$(UDEB_PKG)::
|
|
# generate a minimal MIME cache for the udeb
|
|
mkdir -p $(mimedir)/packages
|
|
[ -f $(mimexml) ]
|
|
xsltproc -nonet debian/keep-png-only.xsl $(mimexml) \
|
|
> $(mimedir)/packages/png.freedesktop.org.xml
|
|
update-mime-database $(mimedir)
|
|
dh_install -p$(UDEB_PKG) $(mimedir)/mime.cache usr/share/mime
|
|
|
|
list-missing:
|
|
perl -w debian/dh_listmissing.pl $(foreach f,$(FLAVORS),$(subst $(CURDIR)/,,$(installbasedir))/$(f)) 2>&1 | \
|
|
egrep -v '(\.la|$(LIBDIR)/gtk-3.0/$(GTK_BINARY_VERSION)/[^/]+/[^/]+\.a) has been installed' >&2
|