~ubuntu-branches/ubuntu/raring/hplip/raring

« back to all changes in this revision

Viewing changes to debian/patches/10_toplevel_makefile.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Henrique de Moraes Holschuh
  • Date: 2005-02-01 12:46:56 UTC
  • Revision ID: james.westby@ubuntu.com-20050201124656-g6cgoa5uezd5lnbo
Tags: 0.8.7-4
* Henrique de Moraes Holschuh:
  * HPLIP:
    * Remove stray tab on 50_securityfix_umask.dpatch.  Reupload in
      case python decides to croak on us because of it
    * Remove unneeded (but harmless) patch 21_base_pidfile_support.dpatch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -e
 
2
## toplevel_makefile.dpatch by Henrique M. Holschuh <hmh@debian.org>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: Fixes for upstream toplevel makefile
 
6
## DP:  1. Add a proper distclean target
 
7
## DP:  2. Stop wasting resources calling pwd
 
8
## DP:  3. Do not bork a non-LSB build
 
9
## DP:  4. Use standard locations and automake/autoconf dir settings
 
10
 
 
11
if [ $# -ne 1 ]; then
 
12
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
 
13
    exit 1
 
14
fi
 
15
 
 
16
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
 
17
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
 
18
 
 
19
case "$1" in
 
20
       -patch) patch $patch_opts -p1 < $0;;
 
21
       -unpatch) patch $patch_opts -p1 -R < $0;;
 
22
        *)
 
23
                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
 
24
                exit 1;;
 
25
esac
 
26
 
 
27
exit 0
 
28
 
 
29
@DPATCH@
 
30
diff -urNad hplip/Makefile.in /tmp/dpep.TXLUzy/hplip/Makefile.in
 
31
--- hplip/Makefile.in   2005-01-21 11:41:20.000000000 -0200
 
32
+++ hplip/Makefile.in   2005-01-21 11:41:44.000000000 -0200
 
33
@@ -12,8 +12,11 @@
 
34
 exec_prefix = @exec_prefix@
 
35
 bindir = @bindir@
 
36
 sbindir = @sbindir@
 
37
+libexecdir = @libexecdir@
 
38
 srcdir = @srcdir@
 
39
 datadir = @datadir@
 
40
+sysconfdir = @sysconfdir@
 
41
+hpsysconfdir = $(sysconfdir)/hp
 
42
 chkconfigdir = @CHKCONFIG_PATH@
 
43
 lsbinstalldir = @LSB_INSTALL_PATH@
 
44
 install = @INSTALL@
 
45
@@ -53,43 +56,45 @@
 
46
 PROJECT_PATH = prnt prnt/hpijs io/hpiod backend/hp base data scan ui ip scan/sane pcard
 
47
 
 
48
 all:
 
49
-       here=`pwd`; \
 
50
+       here=$(CURDIR); \
 
51
        for i in $(PROJECT_PATH); do \
 
52
           cd $$here/$$i; \
 
53
-          $(MAKE) $(AM_MAKEFLAGS); \
 
54
+          $(MAKE) $(AM_MAKEFLAGS) || exit $?; \
 
55
        done
 
56
 
 
57
 install:
 
58
-       here=`pwd`; \
 
59
+       here=$(CURDIR); \
 
60
        for i in $(PROJECT_PATH); do \
 
61
           cd $$here/$$i; \
 
62
-          $(MAKE) $(AM_MAKEFLAGS) install; \
 
63
+          $(MAKE) $(AM_MAKEFLAGS) install || exit $?; \
 
64
        done
 
65
 #
 
66
 #       Install python files to destdir and remove .py extensions.
 
67
-       $(install_script) $(PYTHON_SOURCES) $(PYTHON_SOURCES2) $(DESTDIR)$(datadir)/$(PACKAGE)
 
68
+       $(mkinstalldirs) $(DESTDIR)$(libexecdir)/$(PACKAGE)
 
69
+       $(install_script) $(PYTHON_SOURCES) $(PYTHON_SOURCES2) $(DESTDIR)$(libexecdir)/$(PACKAGE)
 
70
        for i in $(PYTHON_SOURCES); do \
 
71
            newname=$${i%.*}; \
 
72
-           mv $(DESTDIR)$(datadir)/$(PACKAGE)/$$i $(DESTDIR)$(datadir)/$(PACKAGE)/$$newname; \
 
73
+           mv $(DESTDIR)$(libexecdir)/$(PACKAGE)/$$i $(DESTDIR)$(libexecdir)/$(PACKAGE)/$$newname; \
 
74
        done
 
75
 #
 
76
 #       Install and edit hpiod.conf in destdir.
 
77
-       $(install_data) $(PACKAGE).conf $(DESTDIR)$(datadir)/$(PACKAGE)
 
78
-       echo -e "\n[$(PACKAGE)]\nversion=$(VERSION)\njdprobe=0\n" >> $(DESTDIR)$(datadir)/$(PACKAGE)/$(PACKAGE).conf
 
79
-       echo -e "[dirs]\nhome=$(datadir)/$(PACKAGE)\n" >> $(DESTDIR)$(datadir)/$(PACKAGE)/$(PACKAGE).conf
 
80
+       $(mkinstalldirs) $(DESTDIR)$(hpsysconfdir)
 
81
+       $(install_data) $(PACKAGE).conf $(DESTDIR)$(hpsysconfdir)
 
82
+       echo -e "\n[$(PACKAGE)]\nversion=$(VERSION)\njdprobe=0\n" >> $(DESTDIR)$(hpsysconfdir)/$(PACKAGE).conf
 
83
+       echo -e "[dirs]\nhome=$(libexecdir)/$(PACKAGE)\n" >> $(DESTDIR)$(hpsysconfdir)/$(PACKAGE).conf
 
84
 #
 
85
 #       Install and edit hpiod.sh in destdir.
 
86
-       $(install_script) $(PACKAGE).sh $(DESTDIR)$(datadir)/$(PACKAGE); \
 
87
-       sed 's:HPIODDIR=:HPIODDIR=$(sbindir):' < $(DESTDIR)$(datadir)/$(PACKAGE)/$(PACKAGE).sh > $(DESTDIR)$(datadir)/$(PACKAGE)/$(PACKAGE).tmp; \
 
88
-       sed 's:HPSSDDIR=:HPSSDDIR=$(datadir)/$(PACKAGE):' < $(DESTDIR)$(datadir)/$(PACKAGE)/$(PACKAGE).tmp > $(DESTDIR)$(datadir)/$(PACKAGE)/$(PACKAGE).sh; \
 
89
-       rm -f $(DESTDIR)$(datadir)/$(PACKAGE)/$(PACKAGE).tmp
 
90
+        $(install_script) $(PACKAGE).sh $(DESTDIR)$(sysconfdir); \
 
91
+       sed 's:HPIODDIR=:HPIODDIR=$(sbindir):' < $(DESTDIR)$(hpsysconfdir)/$(PACKAGE).sh > $(DESTDIR)$(hpsysconfdir)/$(PACKAGE).tmp; \
 
92
+       sed 's:HPSSDDIR=:HPSSDDIR=$(prefix)/$(PACKAGE):' < $(DESTDIR)$(hpsysconfdir)/$(PACKAGE).tmp > $(DESTDIR)$(hpsysconfdir)/$(PACKAGE).sh; \
 
93
+       rm -f $(DESTDIR)$(hpsysconfdir)/$(PACKAGE).tmp
 
94
 #
 
95
 #       Do full install if not rpm_install. Also only run chkconfig/install_initd if DESTDIR="". 
 
96
        if [ "$(rpm_install)" = "no" ]; then \
 
97
           $(mkinstalldirs) $(DESTDIR)/etc/hp; \
 
98
-          ln -sf $(DESTDIR)$(datadir)/$(PACKAGE)/$(PACKAGE).conf $(DESTDIR)/etc/hp/$(PACKAGE).conf; \
 
99
+          ln -sf $(DESTDIR)$(hpsysconfdir)/$(PACKAGE).conf /etc/hp/$(PACKAGE).conf; \
 
100
           if [ -d /etc/init.d ]; then \
 
101
-             ln -sf $(DESTDIR)$(datadir)/$(PACKAGE)/$(PACKAGE).sh $(DESTDIR)/etc/init.d/$(PACKAGE); \
 
102
+             ln -sf $(DESTDIR)$(hpsysconfdir)/$(PACKAGE).sh /etc/init.d/$(PACKAGE); \
 
103
              if [ "$(DESTDIR)" = "" ]; then \
 
104
                 if [ -x $(lsbinstalldir)/install_initd ]; then \
 
105
                    $(lsbinstalldir)/install_initd $(PACKAGE); \
 
106
@@ -101,31 +106,41 @@
 
107
        fi
 
108
 
 
109
 uninstall:
 
110
-       here=`pwd`; \
 
111
+       here=$(CURDIR); \
 
112
        for i in $(PROJECT_PATH); do \
 
113
           cd $$here/$$i; \
 
114
-          $(MAKE) $(AM_MAKEFLAGS) uninstall; \
 
115
+          $(MAKE) $(AM_MAKEFLAGS) uninstall || exit $?; \
 
116
        done
 
117
 
 
118
 clean:
 
119
        rm -f *~ 
 
120
-       here=`pwd`; \
 
121
+       here=$(CURDIR); \
 
122
        for i in $(PROJECT_PATH); do \
 
123
           cd $$here/$$i; \
 
124
-          $(MAKE) $(AM_MAKEFLAGS) clean; \
 
125
+          $(MAKE) $(AM_MAKEFLAGS) clean || exit $?; \
 
126
        done
 
127
 
 
128
+distclean:
 
129
+       -$(MAKE) $(AM_MAKEFLAGS) clean
 
130
+       here=$(CURDIR) ; \
 
131
+       for i in $(PROJECT_PATH); do \
 
132
+           cd $$here/$$i; \
 
133
+           $(MAKE) $(AM_MAKEFLAGS) distclean || exit $?; \
 
134
+       done
 
135
+       rm -f config.log config.status config.cache
 
136
+       rm -f confdefs.h
 
137
+       rm -f Makefile
 
138
+
 
139
 dist:
 
140
        rm -rf $(PACKAGE)-$(VERSION)
 
141
        mkdir $(PACKAGE)-$(VERSION)
 
142
-       here=`pwd`; \
 
143
+       here=$(CURDIR); \
 
144
        for i in $(PROJECT_PATH); do \
 
145
           mkdir -p $$here/$(PACKAGE)-$(VERSION)/$$i; \
 
146
           cd $$here/$$i; \
 
147
-          $(MAKE) $(AM_MAKEFLAGS) copy COPY_DEST="$$here/$(PACKAGE)-$(VERSION)/$$i"; \
 
148
+          $(MAKE) $(AM_MAKEFLAGS) copy COPY_DEST="$$here/$(PACKAGE)-$(VERSION)/$$i" || exit $?; \
 
149
        done
 
150
        cp -L $(PYTHON_SOURCES) $(PYTHON_SOURCES2) $(DIST_SOURCES) $(DIST_COMMON) $(PACKAGE)-$(VERSION)
 
151
        tar czvf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
 
152
        rm -rf $(PACKAGE)-$(VERSION)
 
153
 
 
154
-