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 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
|
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2003-2006 Jonas Smedegaard <dr@jones.dk>
include debian/cdbs/1/rules/auto-update.mk
# python-distutils first is intentional so that we can use dh_pysupport ourselves.
include /usr/share/cdbs/1/class/python-distutils.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk
include debian/cdbs/1/rules/buildinfo.mk
# Stupid: python-distutils clean target creates byte-compiled code...
# (do this before copyright-check to avoid it finding binary files)
clean::
find . -name '*.py[co]' | xargs -r rm -f
include debian/cdbs/1/rules/copyright-check.mk
pkg_data = moinmoin-common
pkg_lib = python-moinmoin
DEB_MAKE_CHECK_TARGET = test
DEB_COMPRESS_EXCLUDE = .py
DEB_INSTALL_EXAMPLES_$(pkg_data) = build/scripts-*/* wiki/underlay/pages/LocalSpellingWords contrib/phpwiki_migration wiki/config debian/examples/*
DEB_INSTALL_DOCS_ALL += debian/README.Debian
DEB_INSTALL_DOCS_$(pkg_data) += docs/README.migration docs/INSTALL.html docs/CHANGES.config docs/HACKS
DEB_INSTALL_CHANGELOGS_ALL = docs/CHANGES
# just being lazy...
datadir = /usr/share/moin
spelldir= $(datadir)/underlay/pages/LocalSpellingWords
ubuntu:
cp -f debian/control.in.ubuntu debian/control.in
sarge:
cp -f debian/control.in.sarge debian/control.in
binary-install/$(pkg_lib)::
dh_installexamples -p$(cdbs_curpkg) debian/$(cdbs_curpkg)/usr/bin/* debian/$(cdbs_curpkg)/usr/share/moin/server
## Force remove build dir (cdbs DEB_PYTHON_COMPILE_VERSION is slightly broken)
#clean::
# rm -rf build
## DISABLED - may no longer be needed
# Check permissions - using the trick that grep fails with no match
#post-patches:: debian/stamp-bad-permission-check
#
#debian/stamp-bad-permission-check:
# egrep -r '[^0-9a-zA-Z]0?[67]{3}[^0-9a-zA-Z]' * \
# | egrep -v '^(debian|wiki/data/text/|CHANGES|.*\.png$)' \
# && echo "Possible bad chmod!" \
# && exit 1; \
# echo "No bad chmod found..."
# touch debian/stamp-bad-permission-check
#
#clean::
# rm -f debian/stamp-bad-permission-check
# Force strip python binary hardcoding for files moved to data package
# - or force apply it if requested (needed for woody)
## FIXME: do it before debhelper install if forcing binary, to avoid dh_python creating wrong dependencies
#ifeq (,$(strip $(DEB_PYTHON_COMPILE_VERSION)))
#common-install-prehook-indep::
#else
binary-fixup/$(pkg_data)::
#endif
egrep -r -l -Z '^#! ?/usr/bin/(env )?python[[:print:]]*$$' debian/$(cdbs_curpkg)$(datadir)/server/* debian/$(cdbs_curpkg)/usr/share/doc/* \
| xargs -r -0 perl -pi -e 's,^#! ?/usr/bin/(env )?python[[:print:]]*$$,#!/usr/bin/python$(DEB_PYTHON_COMPILE_VERSION),'
dh_pysupport -p$(cdbs_curpkg) /usr/share/moin/data/plugin /usr/share/moin/server
# Strip notes in underlay about editing only on moinmaster
binary-fixup/$(pkg_data)::
egrep -r -l -Z '^## ' debian/$(cdbs_curpkg)$(datadir)/underlay/pages/*/revisions/* \
| xargs -r -0 perl -pi -e 's;^## (Please edit system|information, please see|Please edit |For more information).*\n;;'
## Please edit system and help pages ONLY in the moinmaster wiki! For more
## information, please see MoinMaster:MoinPagesEditorGroup.
## Please edit (or translate) system/help pages on the moinmaster wiki ONLY.
## For more information, please see MoinMaster:MoinPagesEditorGroup.
# Make sure scripts are executable
binary-fixup/$(pkg_lib)::
dh_pysupport -p$(cdbs_curpkg)
egrep -r -l -Z '^#! ?/usr/bin/(env )?python[[:print:]]*$$' debian/$(cdbs_curpkg)/usr/share/python-support/$(cdbs_curpkg) \
| xargs -r -0 chmod a+x
# Make sure translations are up-to-date
common-build-indep:: debian/stamp-update-translations
debian/stamp-update-translations:
cd MoinMoin/i18n && make
touch debian/stamp-update-translations
clean::
cd MoinMoin/i18n && make clean
rm -f debian/stamp-update-translations
# Move common files off of default lib package
# (and drop files already provided as example files)
common-binary-post-install-indep::
rm -rf debian/$(pkg_lib)/usr/bin
rm -rf debian/$(pkg_lib)$(spelldir)
mkdir -p debian/$(pkg_data)$(datadir)
mv debian/$(pkg_lib)$(datadir)/* debian/$(pkg_data)$(datadir)
rm -rf debian/$(pkg_lib)$(datadir)
# Create virtually empty local dictionary
# (default german words already provided as example files)
binary-fixup/$(pkg_data)::
mkdir -p debian/$(cdbs_curpkg)$(spelldir)/revisions
echo "00000001" \
> debian/$(cdbs_curpkg)$(spelldir)/current
echo "Jürgen Hermann Python MoinMoin moin" \
> debian/$(cdbs_curpkg)$(spelldir)/revisions/00000001
echo "Debian GNU" \
>> debian/$(cdbs_curpkg)$(spelldir)/revisions/00000001
# Use sitewide word file as main dictionary
binary-fixup/$(pkg_data)::
mkdir -p debian/$(cdbs_curpkg)$(datadir)/data/dict
ln -s ../../../dict/words debian/$(cdbs_curpkg)$(datadir)/data/dict/words
# Setup system wide farmconfig.
binary-fixup/$(pkg_data)::
mkdir -p debian/$(cdbs_curpkg)/etc/moin
for file in `find debian/$(cdbs_curpkg)$(datadir)/config/wikifarm -type f -print`; do \
sed -f debian/configtweaks.sed $$file > debian/$(cdbs_curpkg)/etc/moin/$${file##*/}; \
done
for file in `find debian/$(cdbs_curpkg)$(datadir)/server -type f -printf '%f\n'`; do \
cat debian/$(cdbs_curpkg)$(datadir)/server/$$file | sed -f debian/servertweaks.sed > debian/$(cdbs_curpkg)$(datadir)/server/$$file.new; \
chmod --reference=debian/$(cdbs_curpkg)$(datadir)/server/$$file debian/$(cdbs_curpkg)$(datadir)/server/$$file.new; \
mv -f debian/$(cdbs_curpkg)$(datadir)/server/$$file.new debian/$(cdbs_curpkg)$(datadir)/server/$$file; \
done
# Strip TwikiDrawPlugin as we need to compile from source
binary-fixup/$(pkg_data)::
rm -f debian/$(cdbs_curpkg)$(datadir)/htdocs/applets/TWikiDrawPlugin/twikidraw.jar
echo "This applet has not yet been packaged for Debian. for now it is available at http://debian.jones.dk/auryn/pool-all/official/moin/twikidraw/" > debian/$(cdbs_curpkg)$(datadir)/htdocs/applets/TWikiDrawPlugin/README
# Move documentation parts of FCKeditor below /usr/share/doc/.../FCKeditor/
binary-fixup/$(pkg_data)::
mkdir -p debian/$(cdbs_curpkg)/usr/share/doc/$(cdbs_curpkg)/FCKeditor
for file in README _documentation.html _whatsnew.html htaccess.txt; do \
mv "debian/$(cdbs_curpkg)$(datadir)/htdocs/applets/FCKeditor/$$file" "debian/$(cdbs_curpkg)/usr/share/doc/$(cdbs_curpkg)/FCKeditor"; \
done
# Strip irrelevant parts of FCKeditor
binary-fixup/$(pkg_data)::
# Non-python server-side code
rm -rf debian/$(cdbs_curpkg)$(datadir)/htdocs/applets/FCKeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts
rm -rf debian/$(cdbs_curpkg)$(datadir)/htdocs/applets/FCKeditor/editor/filemanager/browser/default/connectors
rm -rf debian/$(cdbs_curpkg)$(datadir)/htdocs/applets/FCKeditor/editor/filemanager/upload
rm -f debian/$(cdbs_curpkg)$(datadir)/htdocs/applets/FCKeditor/fckeditor.afp
rm -f debian/$(cdbs_curpkg)$(datadir)/htdocs/applets/FCKeditor/fckeditor.asp
rm -f debian/$(cdbs_curpkg)$(datadir)/htdocs/applets/FCKeditor/fckeditor.cfc
rm -f debian/$(cdbs_curpkg)$(datadir)/htdocs/applets/FCKeditor/fckeditor.cfm
rm -f debian/$(cdbs_curpkg)$(datadir)/htdocs/applets/FCKeditor/fckeditor.lasso
rm -f debian/$(cdbs_curpkg)$(datadir)/htdocs/applets/FCKeditor/fckeditor.php
rm -f debian/$(cdbs_curpkg)$(datadir)/htdocs/applets/FCKeditor/fckeditor.pl
# Seems like sample code for web development
rm -rf debian/$(cdbs_curpkg)$(datadir)/htdocs/applets/FCKeditor/_samples
rm -rf debian/$(cdbs_curpkg)$(datadir)/htdocs/applets/FCKeditor/_testcases
rm -rf debian/$(cdbs_curpkg)$(datadir)/htdocs/applets/FCKeditor/editor/_source
# The LGPL license is included once below /usr/share/common-licenses/
rm -f debian/$(cdbs_curpkg)$(datadir)/htdocs/applets/FCKeditor/license.txt
|