~ubuntu-branches/ubuntu/hardy/moin/hardy

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Josselin Mouette, Pierre Habouzit, Josselin Mouette
  • Date: 2006-09-30 11:28:58 UTC
  • Revision ID: james.westby@ubuntu.com-20060930112858-7p62jy90342rk4hk
Tags: 1.5.3-1.1
[ Pierre Habouzit ]
* Non-maintainer upload.
* Update package to the last python policy (Closes: #373464).
* Bump Standards-Version to 3.7.2.

[ Josselin Mouette ]
* Update Suggests now that mod_python packages were rebuilt.
* Build-depend on python-dev, python-all-dev is too much.
* python-moinmoin needs python-support for a few private modules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
include debian/cdbs/1/rules/auto-update.mk
6
6
 
 
7
# python-distutils first is intentional so that we can use dh_pysupport ourselves.
 
8
include /usr/share/cdbs/1/class/python-distutils.mk
7
9
include /usr/share/cdbs/1/rules/debhelper.mk
8
 
#include /usr/share/cdbs/1/class/python-distutils.mk
9
 
include debian/cdbs/1/class/python-distutils.mk
10
10
include /usr/share/cdbs/1/rules/simple-patchsys.mk
11
11
include debian/cdbs/1/rules/buildinfo.mk
12
12
 
18
18
include debian/cdbs/1/rules/copyright-check.mk
19
19
 
20
20
pkg_data = moinmoin-common
21
 
pkg_lib = python$(DEB_PYTHON_DEFAULT_VERSION)-moinmoin
22
 
pkg_lib_alternatives = $(filter-out $(patsubst %,python%%,$(DEB_PYTHON_DEFAULT_VERSION)),$(DEB_PYTHON_REAL_LIB_PACKAGES))
 
21
pkg_lib  = python-moinmoin
23
22
 
24
23
DEB_MAKE_CHECK_TARGET = test
25
24
DEB_COMPRESS_EXCLUDE = .py
26
 
DEB_INSTALL_EXAMPLES_$(pkg_data) = build/scripts-$(DEB_PYTHON_DEFAULT_VERSION)/* wiki/underlay/pages/LocalSpellingWords contrib/phpwiki_migration wiki/config debian/examples/*
 
25
DEB_INSTALL_EXAMPLES_$(pkg_data) = build/scripts-*/* wiki/underlay/pages/LocalSpellingWords contrib/phpwiki_migration wiki/config debian/examples/*
27
26
DEB_INSTALL_DOCS_ALL += debian/README.Debian
28
27
DEB_INSTALL_DOCS_$(pkg_data) += docs/README.migration docs/INSTALL.html docs/CHANGES.config docs/HACKS
29
28
DEB_INSTALL_CHANGELOGS_ALL = docs/CHANGES
30
29
 
31
 
$(patsubst %,binary-install/%,$(DEB_PYTHON_REAL_LIB_PACKAGES)) ::
32
 
        dh_installexamples -p$(cdbs_curpkg) debian/$(cdbs_curpkg)/usr/bin/* debian/$(cdbs_curpkg)/usr/share/moin/server
33
 
 
34
30
# just being lazy...
35
31
datadir = /usr/share/moin
36
32
spelldir= $(datadir)/underlay/pages/LocalSpellingWords
37
 
libdir = /usr/lib/python$(cdbs_python_ver)/site-packages/MoinMoin
38
33
 
39
 
ubuntu: true
40
 
#       cp -f debian/control.in.ubuntu debian/control.in
 
34
ubuntu:
 
35
        cp -f debian/control.in.ubuntu debian/control.in
41
36
 
42
37
sarge:
43
38
        cp -f debian/control.in.sarge debian/control.in
44
39
 
 
40
binary-install/$(pkg_lib)::
 
41
        dh_installexamples -p$(cdbs_curpkg) debian/$(cdbs_curpkg)/usr/bin/* debian/$(cdbs_curpkg)/usr/share/moin/server
 
42
 
45
43
## Force remove build dir (cdbs DEB_PYTHON_COMPILE_VERSION is slightly broken)
46
44
#clean::
47
45
#       rm -rf build
71
69
#endif
72
70
        egrep -r -l -Z '^#! ?/usr/bin/(env )?python[[:print:]]*$$' debian/$(cdbs_curpkg)$(datadir)/server/* debian/$(cdbs_curpkg)/usr/share/doc/* \
73
71
                | xargs -r -0 perl -pi -e 's,^#! ?/usr/bin/(env )?python[[:print:]]*$$,#!/usr/bin/python$(DEB_PYTHON_COMPILE_VERSION),'
74
 
 
75
 
## FIXME: Avoid pkg_data if that is set to one of the lib packages
76
 
$(patsubst %,binary-fixup/%,$(DEB_PYTHON_REAL_LIB_PACKAGES)) ::
77
 
        egrep -r -l -Z '^#! ?/usr/bin/(env )?python[[:print:]]*$$' debian/$(cdbs_curpkg)$(libdir)/* debian/$(cdbs_curpkg)$(datadir)/server/* debian/$(cdbs_curpkg)/usr/share/doc/* \
78
 
                | xargs -r -0 perl -pi -e 's,^#! ?/usr/bin/(env )?python[[:print:]]*$$,#!/usr/bin/python$(cdbs_python_ver),'
 
72
        dh_pysupport -p$(cdbs_curpkg) /usr/share/moin/data/plugin /usr/share/moin/server
79
73
 
80
74
# Strip notes in underlay about editing only on moinmaster
81
75
binary-fixup/$(pkg_data)::
82
76
        egrep -r -l -Z '^## ' debian/$(cdbs_curpkg)$(datadir)/underlay/pages/*/revisions/* \
83
77
                | xargs -r -0 perl -pi -e 's;^## (Please edit system|information, please see|Please edit |For more information).*\n;;'
84
78
 
85
 
## Please edit system and help pages ONLY in the moinmaster wiki! For more
86
 
## information, please see MoinMaster:MoinPagesEditorGroup.
87
 
## Please edit (or translate) system/help pages on the moinmaster wiki ONLY.
88
 
## For more information, please see MoinMaster:MoinPagesEditorGroup.
 
79
## Please edit system and help pages ONLY in the moinmaster wiki! For more
 
80
## information, please see MoinMaster:MoinPagesEditorGroup.
 
81
## Please edit (or translate) system/help pages on the moinmaster wiki ONLY.
 
82
## For more information, please see MoinMaster:MoinPagesEditorGroup.
89
83
 
90
84
 
91
85
# Make sure scripts are executable
92
 
$(patsubst %,binary-fixup/%,$(DEB_PYTHON_REAL_LIB_PACKAGES)) ::
93
 
        egrep -r -l -Z '^#! ?/usr/bin/(env )?python[[:print:]]*$$' debian/$(cdbs_curpkg)$(libdir)/* \
 
86
binary-fixup/$(pkg_lib)::
 
87
        dh_pysupport -p$(cdbs_curpkg)
 
88
        egrep -r -l -Z '^#! ?/usr/bin/(env )?python[[:print:]]*$$' debian/$(cdbs_curpkg)/usr/share/python-support/$(cdbs_curpkg) \
94
89
                | xargs -r -0 chmod a+x
95
90
 
96
91
# Make sure translations are up-to-date
113
108
        mv debian/$(pkg_lib)$(datadir)/* debian/$(pkg_data)$(datadir)
114
109
        rm -rf debian/$(pkg_lib)$(datadir)
115
110
 
116
 
# Drop common and example files from non-default lib builds
117
 
$(patsubst %,binary-post-install/%,$(pkg_lib_alternatives)) ::
118
 
        rm -rf debian/$(cdbs_curpkg)$(datadir)
119
 
        rm -rf debian/$(cdbs_curpkg)/usr/bin
120
 
 
121
111
# Create virtually empty local dictionary
122
112
# (default german words already provided as example files)
123
113
binary-fixup/$(pkg_data)::
132
122
# Use sitewide word file as main dictionary
133
123
binary-fixup/$(pkg_data)::
134
124
        mkdir -p debian/$(cdbs_curpkg)$(datadir)/data/dict
135
 
        ln -s /usr/share/dict/words debian/$(cdbs_curpkg)$(datadir)/data/dict/words
 
125
        ln -s ../../../dict/words debian/$(cdbs_curpkg)$(datadir)/data/dict/words
136
126
 
137
127
# Setup system wide farmconfig.
138
128
binary-fixup/$(pkg_data)::