~ubuntu-branches/ubuntu/hardy/dbacl/hardy

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Zak B. Elep
  • Date: 2006-03-26 22:35:35 UTC
  • mfrom: (1.1.2 upstream) (2.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20060326223535-bo3m96paoczzz59n
Tags: 1.12-1
* New upstream release
  + `dbacl -V' now exits with status 0.  (Closes: #339394)
* debian/rules:
  + Upstream now fixes TREC file permissions.  However some new scripts got
    added, so this time its a a+x fix instead of a-x.
* debian/patches:
  + Removed 10_slang2_conversion.patch from Clint, now merged upstream.
  + Updated 20_autotools_update.patch .

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
 
SHAREDIR=/usr/share
3
 
CFLAGS = -Wall -g
4
 
INSTALL = install
5
 
INSTALL_FILE    = $(INSTALL) -p    -o root -g root  -m  644
6
 
INSTALL_PROGRAM = $(INSTALL) -p    -o root -g root  -m  755
7
 
INSTALL_SCRIPT  = $(INSTALL) -p    -o root -g root  -m  755
8
 
INSTALL_DIR     = $(INSTALL) -p -d -o root -g root  -m  755
9
 
 
10
 
package=dbacl
11
 
 
12
 
CONFIGFLAGS = --prefix=/usr --mandir=\$${prefix}/share/man
13
 
 
14
 
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
15
 
CFLAGS += -O0
16
 
else
17
 
CFLAGS += -O2
18
 
endif
19
 
 
20
 
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
21
 
INSTALL_PROGRAM += -s
22
 
endif
23
 
 
24
 
build: stamp-configure
25
 
        $(checkdir)
26
 
        cd obj && $(MAKE)
27
 
 
28
 
        cd obj && $(MAKE) check
29
 
 
30
 
        touch build
31
 
 
32
 
stamp-configure:
33
 
        $(checkdir)
34
 
        mkdir obj
35
 
        cd obj && CFLAGS='$(CFLAGS)' ../configure ${CONFIGFLAGS}
36
 
        touch stamp-configure
37
 
 
38
 
clean:
39
 
        $(checkdir)
40
 
        -rm -f build
41
 
        -cd obj && $(MAKE) distclean
42
 
        -rm -f `find . -name "*~"`
43
 
        -rm -rf debian/dbacl core debian/substvars stamp-configure config.cache obj
44
 
 
45
 
binary-indep:   checkroot build
46
 
 
47
 
binary-arch:    checkroot build
48
 
        $(checkdir)
49
 
 
50
 
        -rm -rf debian/$(package)
51
 
        $(INSTALL_DIR) debian/$(package)
52
 
        cd debian/$(package) && $(INSTALL_DIR) usr/share/doc/$(package) DEBIAN
53
 
 
54
 
        cd obj && $(MAKE) install DESTDIR=$(CURDIR)/debian/$(package) INSTALL_PROGRAM='$(INSTALL_PROGRAM)'
55
 
        gzip -9f debian/$(package)/usr/share/man/man1/*.1
56
 
        
57
 
        $(INSTALL_FILE) AUTHORS NEWS README debian/$(package)/usr/share/doc/$(package)
58
 
        $(INSTALL_FILE) ChangeLog debian/$(package)/usr/share/doc/$(package)/changelog
59
 
        chmod -R u+rw,go=rX debian/$(package)/usr/share/doc
60
 
        $(INSTALL_FILE) debian/copyright debian/$(package)/usr/share/doc/$(package)/copyright
61
 
        $(INSTALL_FILE) debian/changelog debian/$(package)/usr/share/doc/$(package)/changelog.Debian
62
 
        gzip -9f debian/$(package)/usr/share/doc/$(package)/changelog \
63
 
                 debian/$(package)/usr/share/doc/$(package)/changelog.Debian \
64
 
 
65
 
        dpkg-shlibdeps -Tdebian/substvars -dDepends debian/$(package)/usr/bin/*
66
 
        dpkg-gencontrol -ldebian/changelog -isp -p$(package) -Tdebian/substvars -Pdebian/$(package)
67
 
 
68
 
        cd debian/$(package) && find * -type f ! -regex '^DEBIAN/.*' -print0 | xargs -r0 md5sum > DEBIAN/md5sums
69
 
 
70
 
        chown -R root.root debian/$(package)
71
 
        chmod -R go=rX debian/$(package)
72
 
 
73
 
        dpkg --build debian/$(package) ..
74
 
 
75
 
define checkdir
76
 
        test -f debian/rules
77
 
endef
78
 
 
79
 
binary:         binary-indep binary-arch
80
 
 
81
 
prebuild:
82
 
 
83
 
checkroot:
84
 
        $(checkdir)
85
 
        test root = "`whoami`"
86
 
 
87
 
.PHONY: binary binary-arch binary-indep clean checkroot prebuild
 
2
# rules -- Debian packaging rules for dbacl
 
3
 
 
4
# Let's use CDBS! :)
 
5
 
 
6
include /usr/share/cdbs/1/rules/debhelper.mk
 
7
include /usr/share/cdbs/1/rules/simple-patchsys.mk
 
8
include /usr/share/cdbs/1/class/autotools.mk
 
9
 
 
10
# Move installed docs to proper Debian location
 
11
install/dbacl::
 
12
        rm -rf $(DEB_DESTDIR)/usr/share/dbacl/doc
 
13
        $(MAKE) -C doc install \
 
14
                documentationdir=$(DEB_DESTDIR)/usr/share/doc/dbacl
 
15
# Move the examples to $(documentationdir)/examples
 
16
        mkdir $(DEB_DESTDIR)/usr/share/doc/dbacl/examples
 
17
        for file in example*.risk toy.risk prop.pl sample*.txt ; do \
 
18
          mv -f $(DEB_DESTDIR)/usr/share/doc/dbacl/$$file \
 
19
            $(DEB_DESTDIR)/usr/share/doc/dbacl/examples ; \
 
20
        done
 
21
# Set proper permissions for TREC files
 
22
#       for file in verify-stderr README basic-email OPTIONS ; do \
 
23
#         chmod 0644 $(DEB_DESTDIR)/usr/share/dbacl/TREC/$$file ; \
 
24
#       done
 
25
        for file in initialize classify train finalize ; do \
 
26
          chmod 0755 $(DEB_DESTDIR)/usr/share/dbacl/TREC/$$file ; \
 
27
        done