1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2013 Vasudev Kamath <kamathvasudev@gmail.com>
# Copyright © 2013 Jonas Smedegaard <dr@jones.dk>
# Description: Main Debian packaging script for EditorConfig core
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
debian/control:: debian/control.in
DEB_PHONY_RULES += debian/control.in
debian/control.in::
sed -e 's/__LIBPKGNAME__/$(libpkg)/g' <debian/control.in.in >debian/control.in
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/rules/upstream-tarball.mk
include /usr/share/cdbs/1/class/cmake.mk
stem = editorconfig
major = $(firstword $(subst .,$(space), $(DEB_UPSTREAM_VERSION)))
lib = lib$(stem)
libpkg = $(lib)$(major)
devpkg = $(lib)-dev
utilspkg = $(stem)
docpkg = $(stem)-doc
# Upstream tarball handling
DEB_UPSTREAM_URL = https://github.com/editorconfig/editorconfig-core/archive
DEB_UPSTREAM_TARBALL_BASENAME = v$(DEB_UPSTREAM_TARBALL_VERSION)
DEB_UPSTREAM_TARBALL_MD5 = 70107f17246188953c65766217e5261a
# Build Depends
CDBS_BUILD_DEPENDS += , cmake, d-shlibs, doxygen
# Depends
CDBS_DEPENDS_$(docpkg) += , libjs-jquery
# enable installation of HTML docs
DEB_CMAKE_NORMAL_ARGS += -DINSTALL_HTML_DOC=ON
# use standard LDFLAGS
DEB_CMAKE_NORMAL_ARGS += -DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" -DCMAKE_SHARED_LINKER_FLAGS="${LDFLAGS}"
# Supress optional build dependencies
CDBS_BUILD_DEPENDS_rules_upstream_tarball =
CDBS_BUILD_DEPENDS_rules_utils_copyright_check =
# Multiarch quirks (should ideally be resolved automagically)
CDBS_BUILD_DEPENDS_rules_debhelper_buildinfo =
CDBS_BUILD_DEPENDS_rules_buildcore_pkgrel =
CDBS_PREDEPENDS = $(if $(DEB_HOST_MULTIARCH),multiarch-support)
# install editorconfig binaries, man pages and docs
DEB_DH_INSTALL_ARGS_$(utilspkg) = usr/bin
DEB_INSTALL_MANPAGES_$(utilspkg) = debian/tmp/usr/share/man/man1/editorconfig.1 debian/tmp/usr/share/man/man3/editorconfig-format.3
DEB_DH_LINK_$(utilspkg) = /usr/share/man/man1/editorconfig.1.gz /usr/share/man/man1/editorconfig-$(DEB_UPSTREAM_VERSION).1.gz
DEB_DH_INSTALL_ARGS_$(docpkg) = usr/share/doc/editorconfig-doc/html/
DEB_DH_LINK_$(docpkg) = /usr/share/javascript/jquery/jquery.js /usr/share/doc/$(docpkg)/html/jquery.js
# Let d-shlibs calculate development package dependencies
# and handle shared library install
binary-post-install/$(libpkg) binary-post-install/$(devpkg):: debian/stamp-local-shlibs-$(lib)
debian/stamp-local-shlibs-$(lib): binary-install/$(libpkg) binary-install/$(devpkg)
d-shlibmove --commit \
--devunversioned \
--multiarch \
--exclude-la \
--override s/$(lib)$(major)-dev/$(lib)-dev/ \
--movedev "debian/tmp/usr/include/*" usr/include/ \
debian/tmp/usr/lib/$(lib).so
touch $@
clean::
rm -f debian/stamp-local-shlibs-$(lib)
binary-post-install/$(docpkg)::
rm -f debian/$(docpkg)/usr/share/doc/$(docpkg)/html/jquery.js
|