5
5
include debian/cdbs/1/rules/auto-update.mk
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
18
18
include debian/cdbs/1/rules/copyright-check.mk
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
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
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
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
40
# cp -f debian/control.in.ubuntu debian/control.in
35
cp -f debian/control.in.ubuntu debian/control.in
43
38
cp -f debian/control.in.sarge debian/control.in
40
binary-install/$(pkg_lib)::
41
dh_installexamples -p$(cdbs_curpkg) debian/$(cdbs_curpkg)/usr/bin/* debian/$(cdbs_curpkg)/usr/share/moin/server
45
43
## Force remove build dir (cdbs DEB_PYTHON_COMPILE_VERSION is slightly broken)
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),'
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
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;;'
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.
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
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)
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
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
137
127
# Setup system wide farmconfig.
138
128
binary-fixup/$(pkg_data)::