1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
|
#!/usr/bin/make -f
# -*- makefile -*-
# debian.rules file for the Debian/GNU Linux octave-forge package
# Copyright 2000 - 2004 by Dirk Eddelbuettel <edd@debian.org>
# Copyright 2005 - 2006 by Debian Octave Group <pkg-octave-devel@lists.alioth.debian.org>
# TODO:
# - examples and docs
# - call dh_shlibdeps ?
# export DH_VERBOSE=1
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/octave/debian/defs.make
# If one (and only one) of Octave 2.1 or 2.9 (-headers) is installed,
# defs.make points to the correct defs.make-x.y.z
# We ensure the correct version by build-conflicts in control
PACKAGE := $(DEB_PACKAGES)
# octave2.1-forge; we only build one binary, so we can use this variable
major := $(shell echo $(PACKAGE) | grep -o [0-9].[0-9] -)
# 2.1 or 2.9
# We should probably exchange LOCALAPIFCNFILEDIR for LOCALFCNFILEDIR in defs.make
# Unless this happens, overwrite it here
# FIXME
# MDIR := $(shell octave-config --print LOCALAPIFCNFILEDIR)
altname := $(PACKAGE)-alternatives
altmdir := /usr/share/$(altname)
altoctdir := /usr/lib/$(altname)
# Needed to override dangling symlink on the autobuilders. The issues with the
# autobuilders need to be resolved post-etch
OCT_VER := $(shell octave --version | grep --only-matching 2.1.[[:xdigit:]]*)
# Hopefully, we will get a LOCALAPIARCHLIBDIR by upstream; until then, work
# around it
# octbin := $(shell octave-config -p LOCALARCHLIBDIR)
OCTAVE_CONFIG := octave-config-$(OCT_VER)
octbin := $(shell $(OCTAVE_CONFIG) -p LOCALARCHLIBDIR)/$(shell $(OCTAVE_CONFIG) -p API_VERSION)
# Installation paths, handed to configure
# in order: m-files, oct-files, executables, alternative m-files, alternative
# oct-files,
# All variables contain the API version
MPATH:=$(DESTDIR)/$(MDIR)/$(PACKAGE)
OPATH:=$(DESTDIR)/$(OCTDIR)/$(PACKAGE)
XPATH:=$(DESTDIR)/$(octbin)/$(PACKAGE)
# This one is forced to have an API version
ALTMPATH:=$(DESTDIR)/$(altmdir)
ALTOPATH:=$(DESTDIR)/$(altoctdir)
DEB_CONFIGURE_EXTRA_FLAGS := --with-mpath=$(MPATH) \
--with-opath=$(OPATH) \
--with-xpath=$(XPATH) \
--with-altmpath=$(ALTMPATH) \
--with-altopath=$(ALTOPATH) \
MKOCTFILE=mkoctfile$(major)
# don't run the check commands
# 'test' is a command available only in octave-forge and Octave 2.9, so for
# Octave 2.1, we would need an earlier version of octave-forge already
# built/installed
# DEB_MAKE_CHECK_TARGET := check
# calculate correct dependencies and move mex to mex2.1
install/$(PACKAGE)::
octave-depends
mv debian/$(PACKAGE)/usr/bin/mex debian/$(PACKAGE)/usr/bin/mex$(major)
mv debian/$(PACKAGE)/usr/share/man/man1/mex.1 debian/$(PACKAGE)/usr/share/man/man1/mex$(major).1
# what we don't want in the package
makebuilddir/$(PACKAGE)::
touch $(CURDIR)/extra/MacOSX/NOINSTALL
# we aren't MacOS, honest
touch $(CURDIR)/main/sparse/NOINSTALL
# sparse code in octave-forge doesn't work for Octave 2.1
# touch $(CURDIR)/FIXES/NOINSTALL
# the FIXES directory has been removed upstream
# show what's not installed
configure/$(PACKAGE)::
find . -name NOINSTALL -print
@echo "Using $(OCTAVE_CONFIG) as octave-config"
# Clean *.m files generated from *.m.in, as well as fixed.info
clean::
rm -f main/plot/print.m \
main/strings/str2double.m \
main/strings/strmatch.m \
main/strings/strcmpi.m \
main/time/datenum.m \
main/fixed/doc/fixed.info
|