~ubuntu-branches/ubuntu/vivid/lazarus/vivid-proposed

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Paul Gevers, Abou Al Montacir, Paul Gevers
  • Date: 2014-04-25 12:57:26 UTC
  • mfrom: (1.1.12)
  • Revision ID: package-import@ubuntu.com-20140425125726-6zkdcnnbbleuuvwj
Tags: 1.2+dfsg-1
[ Abou Al Montacir ]
* Packaged QT4 based IDE and LCL units.

[ Paul Gevers ]
* New upstream release
* Drop obsolete patches + refresh spell_errors.diff
* Update dependencies and description for QT4 changes
* Improve deduplication in d/rules (adds lcl-qt4 -> lcl-gtk2 -> lcl-nogui)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
# Set FPCVER
22
22
FPCVER=$(shell ${FPC} -iV)
23
23
 
24
 
FPCTARGET=$(CPU_TARGET)-linux
 
24
OS_TARGET=$(subst kfreebsd,freebsd,$(shell dpkg-architecture -qDEB_HOST_ARCH_OS))
 
25
 
 
26
FPCTARGET=$(CPU_TARGET)-$(OS_TARGET)
25
27
# Get version information from changelog file
26
28
DEB_VERSION:=$(shell dpkg-parsechangelog | grep '^Version:' | cut -f 2 -d ' ')
27
29
DEB_UPSTREAM_VERSION:=$(shell echo $(DEB_VERSION) | cut -f 1 -d -)
31
33
export PACKAGESUFFIX=-${DEB_UPSTREAM_MAIN_VERSION}
32
34
endif
33
35
# Get directories
34
 
INSTALL_DIR=$(CURDIR)/debian/tmp
 
36
INSTALL_DIR=${CURDIR}/debian/tmp
35
37
BIN_DIR=${INSTALL_DIR}/usr/bin
36
38
LIB_DIR=${INSTALL_DIR}/usr/lib/${DEB_PACKAGE_NAME}/${DEB_UPSTREAM_MAIN_VERSION}
37
39
DOC_DIR=${INSTALL_DIR}/usr/share/doc/${DEB_PACKAGE_NAME}/${DEB_UPSTREAM_MAIN_VERSION}
91
93
        dh_testroot
92
94
        ${RM} lazarus startlazarus lazbuild
93
95
        ${RM} components/aggpas packager/globallinks/aggpas*
94
 
        $(MAKE) distclean ${BUILDOPTS}
 
96
        $(MAKE) distclean ${BUILDOPTS} LCL_PLATFORM=qt
 
97
        $(MAKE) distclean ${BUILDOPTS} LCL_PLATFORM=gtk2
95
98
        $(MAKE) -C docs/html clean
96
99
        find -regex '.*\.\(a\|or?\|so\.*\|ppu\)' -delete
97
100
 
100
103
#
101
104
 
102
105
debian-files: debian-files-stamp
103
 
debian-files-stamp:
 
106
debian-files-stamp:debian/fixdeb debian/*.in
104
107
        @echo "--- Creating/fixing *.install files"
105
108
        DEB_SUBST_PACKAGESUFFIX=${PACKAGESUFFIX} \
106
 
        debian/fixdeb debian/*.in
 
109
        $< debian/*.in
107
110
        touch debian-files-stamp
108
111
 
109
112
make-files: make-files-stamp
131
134
        echo \'$(DEB_VERSION)\' > ide/version.inc
132
135
        touch configure-stamp
133
136
 
134
 
build-arch: configure build-arch-stamp
 
137
build-arch: debian-files configure build-arch-stamp
135
138
build-arch-stamp: ${DEB_HOST_FPC_OPT}
136
139
        @echo "--- Building"
137
140
        dh_testdir
138
 
        ${MAKE} bigide ${BUILDOPTS}
 
141
        # QT4
 
142
        ${MAKE} bigide ${BUILDOPTS} LCL_PLATFORM=qt
 
143
        ${MV} $(CURDIR)/lazarus $(CURDIR)/lazarus-qt4
 
144
        # GTK2
 
145
        ${MAKE} bigide ${BUILDOPTS} LCL_PLATFORM=gtk2
139
146
        ${MV} $(CURDIR)/lazarus $(CURDIR)/lazarus-gtk2
140
147
        touch build-arch-stamp
141
148
 
151
158
        # Install the IDE & its accessories
152
159
        ${CP} -t ${LIB_DIR} \
153
160
                $(CURDIR)/lazarus-gtk2 \
 
161
                $(CURDIR)/lazarus-qt4 \
154
162
                $(CURDIR)/lazbuild \
155
163
                $(CURDIR)/startlazarus \
156
164
                $(CURDIR)/languages
207
215
        find ${INSTALL_DIR} -empty -delete
208
216
 
209
217
        # The following lines are taken from https://wiki.debian.org/dedup.debian.net
210
 
        # Replace duplicate files in lcl-units-* with symlinks
211
 
        rdfind -outputname /dev/null -makesymlinks true ${LIB_DIR}/units
 
218
        # Replace duplicate files in lcl-* with symlinks
 
219
        # directories are listed to make sure the "originals" end up in nogui which the
 
220
        # gtk2 package depend on
 
221
        rdfind -outputname /dev/null -makesymlinks true \
 
222
                ${LIB_DIR}/units/*/nogui \
 
223
                ${LIB_DIR}/units/*/gtk2 \
 
224
                ${LIB_DIR}/units/*/qt \
 
225
                ${LIB_DIR}/components/*/*/*/nogui \
 
226
                ${LIB_DIR}/components/*/*/*/gtk2 \
 
227
                ${LIB_DIR}/components/*/*/*/qt \
 
228
                ${LIB_DIR}/components/*/*/*/*/nogui \
 
229
                ${LIB_DIR}/components/*/*/*/*/gtk2 \
 
230
                ${LIB_DIR}/components/*/*/*/*/qt \
 
231
                ${LIB_DIR}/components/*/*/*/*/*/nogui \
 
232
                ${LIB_DIR}/components/*/*/*/*/*/gtk2 \
 
233
                ${LIB_DIR}/components/*/*/*/*/*/qt
212
234
        # Fix those symlinks to make them relative
213
 
        symlinks -r -s -c ${LIB_DIR}/units
 
235
        symlinks -r -s -c ${LIB_DIR}
214
236
 
215
237
        touch install-arch-stamp
216
238
 
376
398
.PHONY: build clean binary binary-arch \
377
399
        binary-indep debian-files build-arch \
378
400
        install install-indep install-arch \
379
 
        configure configure-indep make-files clean-make-files
 
401
        configure configure-indep make-files clean-make-files \
 
402
        get-orig-source build-doc
380
403
 
381
404
get-orig-source:
382
405
        -uscan --rename --force-download