debian swirl logo

Back to the packages list libosl

#!/usr/bin/make -f

SOURCE = $(shell dpkg-parsechangelog | grep "^Source" | sed "s/Source: //")
VERSION = $(shell dpkg-parsechangelog | grep "^Version" | sed "s/Version: //")
ORIG_VERSION = $(shell echo $(VERSION) | sed "s/-.*//")
PRISTINE_VERSION = $(shell echo $(ORIG_VERSION) | sed "s/\+dfsg//")
UPSTREAM_VERSION = $(shell echo $(PRISTINE_VERSION) | sed "s/^0\.0\.//")
SRCDIR_NAME = $(SOURCE)-$(ORIG_VERSION).orig

DPKG_EXPORT_BUILDFLAGS = 1

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/patchsys-quilt.mk
include /usr/share/dpkg/buildflags.mk

DEB_MAKE_CLEAN_TARGET   = clean
DEB_MAKE_BUILD_TARGET   = all
DEB_MAKE_INSTALL_TARGET = 
DEB_MAKE_CHECK_TARGET   = 

DEB_MAKE_PARALLEL ?= $(and $(DEB_BUILD_PARALLEL),$(DEB_PARALLEL_JOBS),-j$(DEB_PARALLEL_JOBS))

so_ver= 1

DEB_DBG_PACKAGE_libosl$(so_ver) = libosl$(so_ver)-dbg

DEB_INSTALL_DIRS_libosl$(so_ver) += usr/lib

DEB_INSTALL_DIRS_libosl-dev += usr/lib usr/include usr/share/libosl-dev

DEB_INSTALL_DIRS_libosl-doc += usr/share/doc/libosl-doc
DEB_INSTALL_DOCS_libosl-doc += doc/html

pre-build::
		cp $(CURDIR)/debian/makefile.local.$(DEB_HOST_ARCH_CPU) $(CURDIR)/makefile.local

build/libosl$(so_ver)::
		$(MAKE) -C release-so make-directories
		$(MAKE) -C release-so PROF=-g OSL_PUBLIC_RELEASE=t OSL_HOME_FLAGS=-DOSL_HOME=\\\"/usr/share/gpsshogi-data\\\" $(DEB_MAKE_PARALLEL) libosl.so.$(so_ver).0

binary-install/libosl$(so_ver)::
	dh_install -p$(cdbs_curpkg) --sourcedir= release-so libosl.so.* usr/lib

build/libosl-dev::
		$(MAKE) -C release make-directories
		$(MAKE) -C release PROF=-g OSL_PUBLIC_RELEASE=t OSL_HOME_FLAGS=-DOSL_HOME=\\\"/usr/share/gpsshogi-data\\\" $(DEB_MAKE_PARALLEL) all

binary-install/libosl-dev::
	dh_install -p$(cdbs_curpkg) --sourcedir= release lib*.a usr/lib
	dh_install -p$(cdbs_curpkg) --sourcedir= release-so libosl.so usr/lib
	dh_install -p$(cdbs_curpkg) --sourcedir= include -X.svn osl usr/include
	dh_install -p$(cdbs_curpkg) --sourcedir= $(CURDIR) makefile.conf makefile.local \
		  usr/share/$(cdbs_curpkg)

clean::
		$(MAKE) -C release clean
		$(MAKE) -C release-so clean
		-rm release-so/libosl.so*
		-rm -f $(CURDIR)/makefile.local

get-orig-source:
		if [ ! -f osl.tar.gz ] ; then \
		  wget "http://gps.tanaka.ecc.u-tokyo.ac.jp/cgi-bin/viewvc.cgi/trunk/osl.tar.gz" ; \
		fi
		mkdir debian/$(SRCDIR_NAME)
		cd debian/$(SRCDIR_NAME) && tar xzvf ../../osl.tar.gz
		if test "`ls debian/$(SRCDIR_NAME) | wc -l`" -eq "1" ; then \
		subdir= `echo debian/$(SRCDIR_NAME)/*` && \
			mv $$subdir/* $$subdir/.??* debian/$(SRCDIR_NAME) && \
			rmdir $$subdir ; \
		fi
		rm -rf debian/$(SRCDIR_NAME)/lib/third_party
		rm -rf debian/$(SRCDIR_NAME)/public-domain
		tar czf ../$(SOURCE)_$(ORIG_VERSION).orig.tar.gz -C debian $(SRCDIR_NAME)
		rm -rf debian/$(SRCDIR_NAME)

Builds:

libosl1-dbg
library for shogi playing programs
libosl1
library for shogi playing programs
libosl-dev
library for shogi playing programs
libosl-doc
library for shogi playing programs