source: trunk/debathena/debathena/config-package-dev/transform-files.mk @ 22961

Revision 22961, 1.9 KB checked in by tabbott, 16 years ago (diff)
In config-package-dev: * Move homepage field to source package section, so it works. * Make DEB_TRANSFROM_FILES targets depend on common-build-arch and common-build-indep, so it works with architecture-dependent packages. * Remove useless clean code from transform-files.mk. * Move divert.mk from binary-fixup to binary-post-install. * Add debhelper.mk to divert.mk, since we use its binary-post-install/package target. * Change maintainer to me, rather than debathena@mit.edu, since I'll be maintaining config-package-dev in Debian. * Upload to Debian (Closes: #469107)
RevLine 
[22854]1# -*- mode: makefile; coding: utf-8 -*-
2# Copyright © 2008 Tim Abbott <tabbott@mit.edu> and
3#                  Anders Kaseorg <andersk@mit.edu>
4#
5# This program is free software; you can redistribute it and/or
6# modify it under the terms of the GNU General Public License as
7# published by the Free Software Foundation; either version 2, or (at
8# your option) any later version.
9#
10# This program is distributed in the hope that it will be useful, but
11# WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13# General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18# 02111-1307 USA.
19
[22923]20ifndef _cdbs_rules_transform_files
21_cdbs_rules_transform_files = 1
[22854]22
23include /usr/share/cdbs/1/rules/check-files.mk
24
[22923]25DEB_TRANSFORM_FILES = $(foreach package,$(DEB_ALL_PACKAGES),$(DEB_TRANSFORM_FILES_$(package)))
[22854]26
[22923]27DEB_TRANSFORM_FILES_DIR=debian/transform_file_copies
[22854]28
[22923]29debian_transform_files = $(patsubst %,$(DEB_TRANSFORM_FILES_DIR)%,$(1))
30undebian_transform_files = $(patsubst $(DEB_TRANSFORM_FILES_DIR)%,%,$(1))
[22854]31
[22961]32common-build-arch common-build-indep:: $(foreach file,$(DEB_TRANSFORM_FILES),$(call debian_transform_files,$(file)))
[22854]33
[22923]34$(call debian_transform_files,%): $(call debian_check_files,%)
[22854]35        mkdir -p $(@D)
[22923]36        $(if $(DEB_TRANSFORM_SCRIPT_$(call undebian_transform_files,$@)), \
37            $(DEB_TRANSFORM_SCRIPT_$(call undebian_transform_files,$@)), \
38            debian/transform_$(notdir $(call undebian_transform_files,$@))) < $< > $@
[22854]39
40$(patsubst %,binary-install/%,$(DEB_ALL_PACKAGES)) :: binary-install/%:
[22923]41        $(foreach file,$(DEB_TRANSFORM_FILES_$(cdbs_curpkg)), \
[22854]42                install -d $(DEB_DESTDIR)/$(dir $(file)); \
[22923]43                cp -a $(DEB_TRANSFORM_FILES_DIR)$(file) \
[22854]44                    $(DEB_DESTDIR)/$(dir $(file));)
45
46clean::
[22923]47        rm -rf $(DEB_TRANSFORM_FILES_DIR)
[22854]48
49endif
Note: See TracBrowser for help on using the repository browser.