~ubuntu-branches/ubuntu/warty/awstats/warty-security

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2004-05-05 05:12:07 UTC
  • Revision ID: james.westby@ubuntu.com-20040505051207-ren3kcn31tp97db6
Tags: 6.0-4
Really fix bug#247265. Really closes: Bug#247265 (thanks to Edward
J. Shornock <ed@crazeecanuck.homelinux.net>).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
# -*- mode: makefile; coding: utf-8 -*-
 
3
# Copyright © 2003 Jonas Smedegaard <dr@jones.dk>
 
4
 
 
5
include /usr/share/cdbs/1/rules/debhelper.mk
 
6
 
 
7
DEB_INSTALL_CHANGELOGS_ALL = docs/awstats_changelog.txt
 
8
DEB_INSTALL_DOCS_ALL = README.TXT
 
9
 
 
10
awstats_example_scripts = $(wildcard tools/*.pl) $(debian/examples/*.sh) debian/examples/awstats-update
 
11
 
 
12
DEB_INSTALL_EXAMPLES_awstats = $(awstats_example_scripts) debian/examples/awstats-update.8 wwwroot/cgi-bin/awstats.model.conf wwwroot/cgi-bin/plugins/example/* wwwroot/css wwwroot/js
 
13
DEB_COMPRESS_EXCLUDE = $(notdir $(awstats_example_scripts)) awstats.ico
 
14
 
 
15
common-configure::
 
16
        # Use sed rather than a diff here, to make sure all relevant
 
17
        # options are checked (upstream defaults have moved around in
 
18
        # the past)
 
19
        sed \
 
20
                -e 's!^\(LogFile *= *\).*!\1"/var/log/apache/access.log"!g' \
 
21
                -e 's!^\(DirData *= *\).*!\1"/var/lib/awstats"!g' \
 
22
                -e 's!^\(LogFormat *= *\).*!\14!g' \
 
23
                -e 's!^\(DNSLookup *= *\).*!\11!g' \
 
24
                -e 's!^\(DirIcons *= *\).*!\1"/awstats-icon"!g' \
 
25
                -e 's!^\(HostAliases *= *\).*!\1"localhost 127\.0\.0\.1"!g' \
 
26
                -e 's!^\(DirLang *= *\).*!\1"/usr/share/awstats/lang"!g' \
 
27
                -e 's!^#\(LoadPlugin *= *"hashfiles"\)!\1!' \
 
28
                -e 's!^#\(Include *\)""!\1"/etc/awstats/awstats.conf.local"!' \
 
29
                wwwroot/cgi-bin/awstats.model.conf > debian/awstats.conf
 
30
 
 
31
clean::
 
32
        rm -f debian/awstats.conf
 
33
 
 
34
binary-post-install/awstats::
 
35
        # Burn all GIFs...!
 
36
        find $(DEB_DESTDIR) -type f -name *.gif | xargs -r rm
 
37
 
 
38
        # Remove badly coded PDF
 
39
        find $(DEB_DESTDIR) -type f -name *.pdf | xargs -r rm
 
40
 
 
41
        # Debian stores the GPL at one single spot
 
42
        find $(DEB_DESTDIR) -name COPYING.TXT -o -name LICENSE.TXT | xargs -r rm
 
43
 
 
44
binary-fixup/awstats::
 
45
        find $(DEB_DESTDIR)/usr/share/awstats -type f | xargs -r chmod -x
 
46
        find $(DEB_DESTDIR)/usr/share/doc/awstats/examples -name *.pl -o -name *.sh | xargs -r chmod +x
 
47
        chmod +x $(addprefix $(DEB_DESTDIR)/usr/share/doc/awstats/examples/,$(notdir $(awstats_example_scripts)))
 
48
 
 
49
binary-predep/awstats::
 
50
        dh_perl -p$(DEB_CURPACKAGE)