File debian.rules of Package goldendict

#!/usr/bin/make -f
# -*- makefile -*-

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/qmake.mk

export PREFIX=/usr
QMAKE	= 	qmake-qt4

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
export DEB_BUILD_OPTIONS=nocheck

# for Ubuntu/Debian:
DISTRO_NAME=$(shell (cat /etc/issue | cut -d' ' -f1-1))

# for Ubuntu:
DISTRO_YEAR=$(shell (cat /etc/issue | cut -d' ' -f2-2 | cut -d'.' -f1-1))

# for Debian:
DISTRO_VERSION=$(shell (cat /etc/issue | cut -d' ' -f3-3))

ifeq ($(DISTRO_NAME), Ubuntu)
  OLD_UBUNTU=$(shell (expr $(DISTRO_YEAR) \< 12))
  ifeq ($(OLD_UBUNTU), 1)
    DEB_QMAKE_ARGS="CONFIG+=old_hunspell CONFIG+=no_qtmultimedia_player CONFIG+=no_ffmpeg_player "
  endif
  NEW_UBUNTU=$(shell (expr $(DISTRO_YEAR) \> 12))
  ifeq ($(NEW_UBUNTU), 1)
    DEB_QMAKE_ARGS="CONFIG+=old_hunspell CONFIG+=no_epwing_support CONFIG+=no_qtmultimedia_player "
  endif
  ifeq ($(DISTRO_YEAR), 12)
    DEB_QMAKE_ARGS="CONFIG+=old_hunspell CONFIG+=no_epwing_support CONFIG+=no_qtmultimedia_player "
  endif
endif

ifeq ($(DISTRO_NAME), Debian)
  ifeq ($(DISTRO_VERSION), 6.0)
    DEB_QMAKE_ARGS="CONFIG+=old_hunspell CONFIG+=no_qtmultimedia_player CONFIG+=no_ffmpeg_player "
  endif
  ifeq ($(DISTRO_VERSION), 7.0)
    DEB_QMAKE_ARGS="CONFIG+=old_hunspell CONFIG+=no_qtmultimedia_player "
  endif
  NEW_DEBIAN=$(shell (expr $(DISTRO_VERSION) \> 7))
  ifeq ($(NEW_DEBIAN), 1)
    DEB_QMAKE_ARGS="CONFIG+=old_hunspell CONFIG+=no_qtmultimedia_player "
  endif
endif

build:
	pwd
	$(QMAKE) -v
	gcc --version
	dh build

override_dh_check:
	echo "WARNING: skipping running make check for now..."
openSUSE Build Service is sponsored by