~ubuntu-branches/ubuntu/trusty/libf2c2/trusty

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Alan Bain
  • Date: 2008-05-19 22:50:54 UTC
  • mfrom: (2.1.4 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080519225054-jlymia0wdvvfq7dg
Tags: 20061008-4
Remove CVS directory left in source package

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
prefix-dev=debian/libf2c2-dev
10
10
prefix=debian/libf2c2
11
11
 
12
 
arch=$(shell dpkg --print-architecture)
 
12
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
13
 
13
14
dir=$(package)-$(version)
14
15
file=$(package)_$(version)-$(debian)
15
16
flibmajorver=2
16
17
flibver=2.1
17
18
 
18
19
 
 
20
 
 
21
INSTALL = /usr/bin/install
 
22
INSTALL_LIB = $(INSTALL) -o root -g root -m 0644
 
23
 
 
24
CDEBUGFLAGS = -g
 
25
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
26
       CDEBUGFLAGS += -O0
 
27
else
 
28
       CDEBUGFLAGS += -O2
 
29
endif
 
30
 
 
31
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 
32
       INSTALL_LIB += -s
 
33
endif
 
34
 
 
35
 
 
36
 
19
37
# Optimization options.
20
 
GCCOP2=-ansi -O2 -fomit-frame-pointer -mieee-fp -D_POSIX_SOURCE -DDEBIAN
21
 
GCCOP1=-ansi -O2 -fomit-frame-pointer -D_POSIX_SOURCE -DDEBIAN
 
38
GCCOP2=-ansi $(CDEBUGFLAGS) -fomit-frame-pointer -mieee-fp -D_GNU_SOURCE -DDEBIAN
 
39
GCCOP1=-ansi $(CDEBUGFLAGS) -fomit-frame-pointer -D_GNU_SOURCE -DDDEBIAN
22
40
 
23
41
## Avoid using -mieee-fp on anything other than the i386 platform
24
42
## as it is a gcc i386 specific option
25
 
ifeq ($(arch),i386) 
 
43
ifeq ($(DEB_HOST_ARCH),i386) 
26
44
   GCCOPT=$(GCCOP2)
27
45
else 
28
46
   GCCOPT=$(GCCOP1)
33
51
 
34
52
 
35
53
        
36
 
        if [ $(arch) == "i386" ] ;\
 
54
        if [ $(DEB_HOST_ARCH) = "i386" ] ;\
37
55
           then echo "Building for i386" ;\
38
56
        fi
39
57
 
40
58
#alpha long makes extra-long which is incompatible 
41
59
#with other fortran systems on alpha
42
 
        if [ $(arch) == "alpha" ] ;\
43
 
           then echo "Building for ALPHA" ;\
44
 
           sed 's/long //' f2c.h > f2c.install.h ;\
 
60
        if [ $(DEB_HOST_ARCH) = "alpha" -o $(arch) = "ia64" ] ;\
 
61
           then echo "Building for ALPHA or IA64" ;\
 
62
           sed 's/long //' f2c_master.h > f2c.h ;\
45
63
        else \
46
 
                cp f2c.h f2c.install.h ;\
 
64
                cp f2c_master.h f2c.h ;\
47
65
        fi
48
66
 
49
67
## These take gcc options from GCCOPT 
50
 
        $(MAKE) -f ./debian/make_lib INTSIZE=f2c
51
 
        $(MAKE) -f ./debian/make_lib INTSIZE=f2c_i2
52
 
        strip libf2c.so.2.1
53
 
        strip libf2c_i2.so.2.1
 
68
        $(MAKE) -f ./debian/make_lib INTSIZE=f2c GCCOPT="$(GCCOPT)"
 
69
## Make sure everything rebuilt for -I2 lib
 
70
        $(MAKE) -f ./debian/make_lib clean
 
71
        $(MAKE) -f ./debian/make_lib INTSIZE=f2c_i2 GCCOPT="$(GCCOPT)"
54
72
        touch build
55
73
 
56
74
clean:
85
103
        install -c -m 0644 libf2c.a    ${prefix-dev}/usr/lib/libf2c.a
86
104
        install -c -m 0644 libf2c_i2.a ${prefix-dev}/usr/lib/libf2c_i2.a
87
105
        install -d -m 0755             ${prefix-dev}/usr/include
88
 
        install -c -m 0644 f2c.install.h   ${prefix-dev}/usr/include/f2c.h
 
106
        install -c -m 0644 f2c.h   ${prefix-dev}/usr/include/f2c.h
89
107
 
90
108
# shared libs in shared lib package
91
 
        install -s -c -m 0644 libf2c.so.$(flibver) \
 
109
        $(INSTALL_LIB) libf2c.so.$(flibver) \
92
110
                                    ${prefix}/usr/lib/libf2c.so.$(flibver)
93
 
        install -s -c -m 0644 libf2c_i2.so.$(flibver) \
 
111
        $(INSTALL_LIB) libf2c_i2.so.$(flibver) \
94
112
                                    ${prefix}/usr/lib/libf2c_i2.so.$(flibver)
95
113
 
96
114
        (cd ${prefix}/usr/lib; ln -s libf2c.so.$(flibver) libf2c.so.$(flibmajorver); \
97
115
        ln -s libf2c_i2.so.$(flibver) libf2c_i2.so.$(flibmajorver) )
98
116
 
99
 
        (cd ${prefix-dev}/usr/lib; ln -sf libf2c.so.$(flibver) libf2c.so; \
 
117
        (cd ${prefix-dev}/usr/lib; ln -sf libf2c.so.$(flibver) libf2c.so        ; \
100
118
        ln -s libf2c_i2.so.$(flibver) libf2c_i2.so )
101
119
 
 
120
 
102
121
        install -d -m 0755             ${prefix-dev}/usr/share/doc/$(package-dev)
103
122
        install -d -m 0755             ${prefix}/usr/share/doc/$(package)
104
123
        install -c -m 0644 changes     ${prefix}/usr/share/doc/$(package)/changelog
105
124
        install -c -m 0644 changes     ${prefix-dev}/usr/share/doc/$(package-dev)/changelog
106
 
        install -c -m 0644 libF77/README      ${prefix}/usr/share/doc/$(package)/libF77README
107
 
        install -c -m 0644 libI77/README      ${prefix}/usr/share/doc/$(package)/libI77README
108
 
        install -c -m 0644 libF77/README      ${prefix-dev}/usr/share/doc/$(package-dev)/libF77README
109
 
        install -c -m 0644 libI77/README      ${prefix-dev}/usr/share/doc/$(package-dev)/libI77README
 
125
        install -c -m 0644 README      ${prefix}/usr/share/doc/$(package)/README
 
126
        install -c -m 0644 README      ${prefix-dev}/usr/share/doc/$(package-dev)/README
110
127
        install -c -m 0644 debian/changelog \
111
128
                                    ${prefix-dev}/usr/share/doc/$(package-dev)/changelog.Debian
112
129
        install -c -m 0644 debian/changelog \
126
143
        dpkg-shlibdeps -Tdebian/substvars.libf2c2 debian/libf2c2/usr/lib/*
127
144
        dpkg-gencontrol -isp -plibf2c2-dev -Pdebian/libf2c2-dev 
128
145
        dpkg-gencontrol -isp -plibf2c2 -Pdebian/libf2c2 -Tdebian/substvars.libf2c2
 
146
        dh_md5sums
129
147
        chown -R root.root ${prefix-dev}
130
148
        chown -R root.root ${prefix}
131
149
        chmod -R go-ws ${prefix-dev}
137
155
## Below Here is Generic
138
156
 
139
157
define checkdir
140
 
        test -f ./libF77/libF77.xsum
 
158
        test -f ./fio.h
141
159
endef
142
160
 
143
161
binary: binary-indep binary-arch