SHELL := /bin/bash
PATH := $(PATH):$(shell pwd)/build
TDE_VERSION := $(shell echo $${TDE_VERSION:-14.0.5})
TDE_PACKAGING_DIR := $(shell [ -n "$${TDE_PACKAGING_DIR}" ] && cd "$${TDE_PACKAGING_DIR}" || cd ..; pwd)
DIST := $(shell rpm -E %dist)

buildpkg = \
  @echo "Now processing '$(1)' [from $(TDE_PACKAGING_DIR)]."; \
  export TDE_PACKAGING_DIR=$(TDE_PACKAGING_DIR); \
  if [ "${REBUILD}" = "$(1)" ] || ! is_latest_package_installed.sh "$(1)" ${TDE_VERSION}; then \
    echo "  Package '${1}' is not yet installed."; \
    if [ "${REBUILD}" = "$(1)" ] || ! is_latest_package_built.sh "$(1)" ${TDE_VERSION}; then \
      echo "  Building package."; \
      build_rpm_package.sh "$(1)" ${TDE_VERSION} || exit 1; \
      echo "  Updating repository."; \
      update_repository.sh ${TDE_VERSION}; \
    fi; \
    echo "Now installing package '$(1)'"; \
    install_rpm_package.sh "$(1)" || exit 2; \
  fi; \
  echo


all:	dependencies main libraries applications i18n meta extras
dependencies:	tqt3 tqtinterface akode arts libart_lgpl libcaldav libcarddav sip4-tqt tqca tqca-tls avahi-tqt dbus-tqt dbus-1-tqt
main:	tdelibs tdebase tdeaccessibility tdeadmin tdegames tdemultimedia tdepim tdetoys tdevelop tdeaddons tdeartwork tdebindings tdeedu tdegraphics tdenetwork tdesdk tdeutils tdewebdev
libraries:	kipi-plugins libkdcraw libkexiv2 libkipi libksquirrel libtdeldap libtqt-perl pytdeextensions python-trinity
applications:	abakus amarok basket bibletime digikam dolphin filelight gtk3-tqt-engine gtk-qt-engine gwenview k3b k9copy kaffeine kaffeine-mozilla kasablanca katapult kbarcode kbfx kbibtex kbiff kbookreader kchmviewer kcmautostart kcmldap kcmldapcontroller kcmldapmanager kcpuload kdbg kdbusnotification kdiff3 kdirstat keep kerberostray keximdb kftpgrabber kile kima kiosktool kkbswitch klcddimmer kmplayer kmyfirewall kmymoney knemo knetload knetstats knetworkmanager8 knights knmap knowit knutclient koffice konversation kooldock kopete-otr kpicosim kpilot kplayer krecipes krename krusader kscope ksensors kshowmail kshutdown ksplash-engine-moodin ksquirrel kstreamripper ksystemlog ktechlab ktorrent kuickshow kvirc kvkbd kvpnc kxmleditor mplayerthumbs piklab potracegui qalculate-tde qt4-tqt-theme-engine rosegarden smartcardauth smb4k soundkonverter tastymenu tdedocker tde-guidance tdeio-apt tdeio-ftps tdeio-gopher tdeio-locate tdeio-sword tdeio-umountwrapper tdenetworkmanager tdepowersave tderadio tde-style-lipstik tde-style-baghira tde-style-domino tde-style-ia-ora tde-style-qtcurve tdesudo tdesvn tde-systemsettings tdmtheme tellico tork twin-style-crystal wlassistant yakuake
i18n:	gwenview-i18n k3b-i18n koffice-i18n tde-i18n
extras:	icons-crystalsvg-updated icons-kfaenza icons-nuvola icons-oxygen kdevmon kdissert klibido kompose koverartist kpacman mathemagics png2qrgb


### Trinity Dependencies
akode:	tqtinterface trinity-filesystem
	$(call buildpkg,dependencies/akode)

arts:	tqtinterface trinity-filesystem esound cmake
	$(call buildpkg,dependencies/arts)

avahi-tqt:	tqtinterface autoconf automake libtool2
	$(call buildpkg,dependencies/avahi-tqt)

dbus-1-tqt:	tqtinterface cmake
	$(call buildpkg,dependencies/dbus-1-tqt)

dbus-tqt: tqtinterface cmake
	$(call buildpkg,dependencies/dbus-tqt)

libart_lgpl:	tqtinterface libtool2
	$(call buildpkg,dependencies/libart-lgpl)

libcaldav: tqtinterface autoconf libcurl
	$(call buildpkg,dependencies/libcaldav)

libcarddav:	tqtinterface autoconf libcurl
	$(call buildpkg,dependencies/libcarddav)

libr:
	$(call buildpkg,dependencies/libr)

python-tqt: sip4-tqt tdelibs tqscintilla
	$(call buildpkg,dependencies/python-tqt)

sip4-tqt:
	$(call buildpkg,dependencies/sip4-tqt)

tqca:	tqtinterface
	$(call buildpkg,dependencies/tqca)

tqca-tls: tqtinterface tqca
	$(call buildpkg,dependencies/tqca-tls)

tqscintilla: tqca-tls tdelibs
	$(call buildpkg,dependencies/tqscintilla)

tqt3:
	$(call buildpkg,dependencies/tqt3)

tqtinterface:	tqt3 cmake
	$(call buildpkg,dependencies/tqtinterface)

# Main packages
tdeaccessibility:	tdebase tdemultimedia
	$(call buildpkg,main/tdeaccessibility)

tdeaddons:	tdebase tdegames tdemultimedia tdenetwork tdepim
	$(call buildpkg,main/tdeaddons)

tdeadmin:	tdebase
	$(call buildpkg,main/tdeadmin)

tdeartwork:	tdebase
	$(call buildpkg,main/tdeartwork)

tdebase:	tdelibs cmake htdig fileshareset
	$(call buildpkg,main/tdebase)

tdebindings:	tdebase tqscintilla
	$(call buildpkg,main/tdebindings)

tdeedu:	tdebase
	$(call buildpkg,main/tdeedu)

tdegames:	tdebase tdemultimedia
	$(call buildpkg,main/tdegames)

tdegraphics:	tdebase poppler cmake lcms
	$(call buildpkg,main/tdegraphics)

tdelibs:	tqt3 tqtinterface arts dbus-tqt dbus-1-tqt cmake avahi-tqt fileshareset trinity-filesystem libart_lgpl file
	[ -x /usr/libexec/utempter/utempter ] && sudo chmod a+r /usr/libexec/utempter/utempter || :
	$(call buildpkg,main/tdelibs)

tdemultimedia:	tdebase akode
	$(call buildpkg,main/tdemultimedia)

tdenetwork:	tdebase rdesktop
	$(call buildpkg,main/tdenetwork)

tdepim:	tdebase libcaldav libcarddav cmake dirmngr
	$(call buildpkg,main/tdepim)

tdesdk:		tdebase tdebindings cmake
	$(call buildpkg,main/tdesdk)

tdetoys:	tdebase
	$(call buildpkg,main/tdetoys)

tdeutils:	tdebase
	$(call buildpkg,main/tdeutils)

tdevelop:	tdebase tdesdk cmake tar
	$(call buildpkg,main/tdevelop)

tdewebdev:	tdebase tdesdk
	$(call buildpkg,main/tdewebdev)

### 3rd party libraries and tools
autoconf: m4
# Build on CentOS 5 only
ifneq (,$(filter $(DIST),.el5 .el6))
	$(call buildpkg,3rdparty/autoconf)
endif

automake:
# Build on CentOS 5 only
ifneq (,$(filter $(DIST),.el5))
	$(call buildpkg,3rdparty/automake)
endif

cmake:
# Build on CentOS 5 only
ifneq (,$(filter $(DIST),.el5))
	$(call buildpkg,3rdparty/cmake)
endif

cscope:
# Build on PCLOS only
ifneq ($(wildcard /etc/pclinuxos-release),)
	$(call buildpkg,3rdparty/cscope)
endif

dirmngr:
# Build on CentOS >= 7
ifneq ($(wildcard /boot/vmlinuz*.el7*),)
	$(call buildpkg,3rdparty/dirmngr)
endif

esound:
# Build on Mageia, Fedora >= 23, Opensuse >= 15.0
ifneq (,$(filter $(DIST),.mga5 .mga6 .fc23 .fc24 .fc25 .fc26 .fc27 .oss150 .osstw))
	$(call buildpkg,3rdparty/esound)
endif

file:
# Build on CentOS 5
ifneq (,$(filter $(DIST),.el5))
	$(call buildpkg,3rdparty/file)
endif

gmime:
# Build on CentOS 6
ifneq (,$(filter $(DIST),.el6))
	$(call buildpkg,3rdparty/gmime)
endif

intltool:
# Build on CentOS 5
ifneq (,$(filter $(DIST),.el5))
	$(call buildpkg,3rdparty/intltool)
endif

gnuchess:
# Build on CentOS 5
ifneq (,$(filter $(DIST),.el5))
	$(call buildpkg,3rdparty/gnuchess)
endif

htdig:
# build on Mageia, and CentOS >= 7
ifneq ($(wildcard /etc/mageia-release /boot/vmlinuz*.el7*),)
	$(call buildpkg,extras/htdig)
endif

imlib1:
# Do NOT build on Fedora, nor CentOS, nor PCLOS
ifeq ($(wildcard /etc/fedora-release),)
ifeq (,$(filter $(DIST),.el5 .el6 .el7))
	$(call buildpkg,3rdparty/imlib1)
endif
endif

lcms:
# Build on EL7, OSS150, OSSTW
ifneq (,$(filter $(DIST),.el7 .oss150 .osstw))
	$(call buildpkg,3rdparty/lcms)
endif

libcurl: automake libtool2
# Build on CentOS 5 only
ifneq (,$(filter $(DIST),.el4))
	$(call buildpkg,3rdparty/curl)
endif

libtool2: autoconf automake
# Build on CentOS 5 only
ifneq (,$(filter $(DIST),.el5))
	$(call buildpkg,3rdparty/libtool2)
endif

lilypond: mftrace
# Build on CentOS 6 only
ifneq (,$(filter $(DIST),.el6))
	$(call buildpkg,3rdparty/lilypond)
endif

m4:
# Build on CentOS 5 and CentOS 6 only (vendor-provided m4 is too old)
ifneq (,$(filter $(DIST),.el5 .el6))
	$(call buildpkg,3rdparty/m4)
endif

mftrace:
# Build on CentOS 6 only
ifneq (,$(filter $(DIST),.el6))
	$(call buildpkg,3rdparty/mftrace)
endif

mp4v2:
# Build on OpenSUSE only
ifneq (,$(filter $(DIST),.oss131 .oss132 .oss421 .oss422 .oss423 .oss150 .osstw))
	$(call buildpkg,3rdparty/mp4v2)
endif

pcsc-perl:
# Build on CentOS  5
ifneq (,$(filter $(DIST),.el5))
	$(call buildpkg,3rdparty/pcsc-perl)
endif

poppler:
# Build on CentOS 5 only (vendor-provided Poppler is too old)
ifneq (,$(filter $(DIST),.el5))
	$(call buildpkg,3rdparty/poppler)
endif

python-qt3: tdelibs sip
	$(call buildpkg,3rdparty/python-qt3)

rdesktop:
# Build on OpenSUSE >= 15.0 only
ifneq (,$(filter $(DIST),.oss150))
	$(call buildpkg,3rdparty/rdesktop)
endif

rdiff-backup:
# Only for PCLINUXOS
ifneq ($(wildcard /etc/pclinuxos-release),)
	$(call buildpkg,3rdparty/rdiff-backup)
endif

recode:
# Build on OpenSUSE >= 15.0 only
ifneq (,$(filter $(DIST),.oss150 .osstw))
	$(call buildpkg,3rdparty/recode)
endif

sip:
# Build on CentOS 5 only (vendor-provided SIP is too old)
ifneq (,$(filter $(DIST),.el5))
	$(call buildpkg,3rdparty/sip)
endif

sword:
# Build on CentOS 5 only
ifneq (,$(filter $(DIST),.el5))
	$(call buildpkg,3rdparty/sword)
endif

tar:
# Build on CentOS 5 only (vendor-provided TAR is too old)
ifneq (,$(filter $(DIST),.el5))
	$(call buildpkg,3rdparty/tar)
endif

torsocks:
# Build on opensuse
ifneq (,$(filter $(DIST), .oss))
	$(call buildpkg,3rdparty/torsocks)
endif

wv2:
# Do NOT build on Mageia or openSUSE or PCLINUXOS
ifeq (,$(filter $(DIST), .mga5 .mga6 .oss421 .oss422 .oss423 .oss150 .osstw .pclos .pclos2018))
	$(call buildpkg,3rdparty/wv2)
endif

### Extra packages
cmake-macros: cmake
ifneq ($(wildcard /etc/SuSE-release),)
	$(call buildpkg,extras/trinity-cmake-macros)
endif

### Trinity Libraries
kipi-plugins:	tqtinterface tdelibs tdepim libkdcraw libkexiv2 libkipi
	$(call buildpkg,libraries/kipi-plugins)

libkdcraw:	tqtinterface lcms
	$(call buildpkg,libraries/libkdcraw)

libkexiv2:	tqtinterface
	$(call buildpkg,libraries/libkexiv2)

libkipi:	tqtinterface
	$(call buildpkg,libraries/libkipi)

libksquirrel:	tdelibs
	$(call buildpkg,libraries/libksquirrel)

libtdeldap:	tqtinterface
	$(call buildpkg,libraries/libtdeldap)

libtqt-perl:	tqtinterface
	$(call buildpkg,libraries/libtqt-perl)

mlt:	tqtinterface
	$(call buildpkg,libraries/mlt)

pytdeextensions:	tqtinterface python-trinity
	$(call buildpkg,libraries/pytdeextensions)

python-trinity:	tqtinterface python-tqt
	$(call buildpkg,libraries/python-trinity)

### Trinity Applications
abakus:	tdebase
	$(call buildpkg,applications/abakus)

adept:	tdebase
	$(call buildpkg,applications/adept)

amarok:	tdebase cmake mp4v2
	$(call buildpkg,applications/amarok)

basket:	tdebase tdepim
	$(call buildpkg,applications/basket)

bibletime:	tdebase sword
	$(call buildpkg,applications/bibletime)

compizconfig-backend-kconfig:	tdebase
	$(call buildpkg,applications/compizconfig-backend-kconfig)

desktop-effects-tde:	tdebase
	$(call buildpkg,applications/desktop-effects-tde)

digikam:	tdebase libkdcraw libkexiv2 libkipi libksquirrel
	$(call buildpkg,applications/digikam)

dolphin:	tdebase
	$(call buildpkg,applications/dolphin)

filelight:	tdebase
	$(call buildpkg,applications/filelight)

filelight-l10n:	tdebase
	$(call buildpkg,applications/filelight-l10n)

fusion-icon:	tdebase
	$(call buildpkg,applications/fusion-icon)

gtk3-tqt-engine:	tdebase
# Do NOT build on CentOS 5, CentOS 6
ifeq (,$(filter $(DIST),.el5 .el6))
	$(call buildpkg,applications/gtk3-tqt-engine)
endif

gtk-qt-engine:	tdebase
# Do NOT build on CentOS 5 (GTK2 is too old)
ifeq (,$(filter $(DIST),.el5))
	$(call buildpkg,applications/gtk-qt-engine)
endif

gwenview:	tdebase
	$(call buildpkg,applications/gwenview)

k3b:	tdebase
# Do NOT build on CentOS 5 (No TDE HWLIB support)
ifeq (,$(filter $(DIST),.el5))
	$(call buildpkg,applications/k3b)
endif

k9copy:	tdebase k3b
# Do NOT build on CentOS 5 (No K3B)
ifeq (,$(filter $(DIST),.el5))
	$(call buildpkg,applications/k9copy)
endif

kaffeine:	tdebase
	$(call buildpkg,applications/kaffeine)

kaffeine-mozilla:	tdebase kaffeine
	$(call buildpkg,applications/kaffeine-mozilla)

kasablanca:	tdebase
	$(call buildpkg,applications/kasablanca)

katapult:	tdebase
	$(call buildpkg,applications/katapult)

kbarcode:	tdebase
	$(call buildpkg,applications/kbarcode)

kbfx:	tdebase
	$(call buildpkg,applications/kbfx)

kbibtex:	tdebase
	$(call buildpkg,applications/kbibtex)

kbiff:	tdebase
	$(call buildpkg,applications/kbiff)

kbookreader:	tdebase
	$(call buildpkg,applications/kbookreader)

kchmviewer:	tdebase
	$(call buildpkg,applications/kchmviewer)

kcmautostart:	tdebase
	$(call buildpkg,applications/kcmautostart)

kcmldap:	tdebase libtdeldap
# Do NOT build on CentOS 5
ifeq (,$(filter $(DIST),.el5))
	$(call buildpkg,applications/kcmldap)
endif

kcmldapcontroller:	tdebase kcmldap
# Do NOT build on CentOS 5
ifeq (,$(filter $(DIST),.el5))
	$(call buildpkg,applications/kcmldapcontroller)
endif

kcmldapmanager:	tdebase kcmldap
# Do NOT build on CentOS 5
ifeq (,$(filter $(DIST),.el5))
	$(call buildpkg,applications/kcmldapmanager)
endif

kcpuload:	tdebase
	$(call buildpkg,applications/kcpuload)

kdbg:	tdebase
	$(call buildpkg,applications/kdbg)

kdbusnotification:	tdebase
	$(call buildpkg,applications/kdbusnotification)

kdiff3:	tdebase
	$(call buildpkg,applications/kdiff3)

kdirstat:	tdebase
	$(call buildpkg,applications/kdirstat)

kdpkg:	tdebase
	$(call buildpkg,applications/kdpkg)

keep:	tdebase rdiff-backup
	$(call buildpkg,applications/keep)

kerberostray:	tdebase
# Do NOT build on CentOS 5
ifeq (,$(filter $(DIST),.el5))
	$(call buildpkg,applications/kerberostray)
endif

keximdb:	tdebase koffice
	$(call buildpkg,applications/keximdb)

kftpgrabber:	tdebase
	$(call buildpkg,applications/kftpgrabber)

kgtk-qt3:	tdebase
# Do NOT build on CentOS 5 (GTK2 is too old)
# Do NOT build on CentOS >=7 (GTK2 is too new)
# Do NOT build on Fedora >= 20 (GTK2 is too new)
# Do NOT build on Mageia >= 4 (GTK2 is too new)
ifeq ($(wildcard /boot/vmlinuz*.el5* /boot/vmlinuz*.el7* /boot/vmlinuz*.fc20* /boot/vmlinuz*.mga4*),)
	$(call buildpkg,applications/kgtk-qt3)
endif

kile:	tdebase
	$(call buildpkg,applications/kile)

kima:	tdebase
# Not on RHEL5
ifeq (,$(filter $(DIST),.el5))
	$(call buildpkg,applications/kima)
endif

kiosktool:	tdebase
	$(call buildpkg,applications/kiosktool)

kkbswitch:	tdebase
	$(call buildpkg,applications/kkbswitch)

klcddimmer:	tdebase
	$(call buildpkg,applications/klcddimmer)

kmplayer:	tdebase
	$(call buildpkg,applications/kmplayer)

kmyfirewall:	tdebase
	$(call buildpkg,applications/kmyfirewall)

kmymoney:	tdebase recode
	$(call buildpkg,applications/kmymoney)

knemo:	tdebase
	$(call buildpkg,applications/knemo)

knetload:	tdebase
	$(call buildpkg,applications/knetload)

knetstats:	tdebase
	$(call buildpkg,applications/knetstats)

knetworkmanager8:	tdebase
# RHEL6 only
ifneq (,$(filter $(DIST),.el6))
	$(call buildpkg,applications/knetworkmanager8)
endif

knights:	tdebase gnuchess
	$(call buildpkg,applications/knights)

knmap:	tdebase
	$(call buildpkg,applications/knmap)

knowit:	tdebase
	$(call buildpkg,applications/knowit)

knutclient:	tdebase
	$(call buildpkg,applications/knutclient)

koffice:	tdebase tdegraphics wv2
	$(call buildpkg,applications/koffice)

konversation:	tdebase
	$(call buildpkg,applications/konversation)

kooldock:	tdebase
	$(call buildpkg,applications/kooldock)

kopete-otr:	tdebase tdenetwork
	$(call buildpkg,applications/kopete-otr)

kpicosim:	tdebase
	$(call buildpkg,applications/kpicosim)

kpilot:	tdebase tdepim
# Do NOT build on CentOS 5 (pilot-link library is too old)
ifeq (,$(filter $(DIST),.el5))
	$(call buildpkg,applications/kpilot)
endif

kplayer:	tdebase
	$(call buildpkg,applications/kplayer)

kpowersave:	tdebase
	$(call buildpkg,applications/kpowersave)

krecipes:	tdebase
	$(call buildpkg,applications/krecipes)

krename:	tdebase
	$(call buildpkg,applications/krename)

krusader:	tdebase tdebindings
	$(call buildpkg,applications/krusader)

kscope:	tdebase cscope
	$(call buildpkg,applications/kscope)

ksensors:	tdebase
	$(call buildpkg,applications/ksensors)

kshowmail:	tdebase
	$(call buildpkg,applications/kshowmail)

kshutdown:	tdebase
	$(call buildpkg,applications/kshutdown)

ksplash-engine-moodin:	tdebase
	$(call buildpkg,applications/ksplash-engine-moodin)

ksquirrel:	tdebase libkipi libksquirrel
	$(call buildpkg,applications/ksquirrel)

kstreamripper:	tdebase
	$(call buildpkg,applications/kstreamripper)

ksystemlog:	tdebase
	$(call buildpkg,applications/ksystemlog)

ktechlab:	tdebase
	$(call buildpkg,applications/ktechlab)

ktorrent:	tdebase
	$(call buildpkg,applications/ktorrent)

kuickshow:	tdebase imlib1
	$(call buildpkg,applications/kuickshow)

kvirc:	tdebase
	$(call buildpkg,applications/kvirc)

kvkbd:	tdebase
	$(call buildpkg,applications/kvkbd)

kvpnc:	tdebase
	$(call buildpkg,applications/kvpnc)

kxmleditor:	tdebase
	$(call buildpkg,applications/kxmleditor)

mplayerthumbs:	tdebase
	$(call buildpkg,applications/mplayerthumbs)

piklab:	tdebase
	$(call buildpkg,applications/piklab)

potracegui:	tdebase
	$(call buildpkg,applications/potracegui)

qalculate-tde:	tdebase
# Do NOT build on CentOS 5, CentOS 6
ifeq (,$(filter $(DIST),.el5 .el6))
	$(call buildpkg,applications/qalculate-tde)
endif

qt4-tqt-theme-engine:	tdebase
# Do NOT build on CentOS 5, CentOS 6
ifeq (,$(filter $(DIST),.el5 .el6))
	$(call buildpkg,applications/qt4-tqt-theme-engine)
endif

rosegarden:	tdebase lilypond
# Do NOT build on CentOS 5, CentOS 7
ifeq (,$(filter $(DIST),.el5 .el7))
	$(call buildpkg,applications/rosegarden)
endif

smartcardauth:	tdebase pcsc-perl
	$(call buildpkg,applications/smartcardauth)

smb4k:	tdebase
	$(call buildpkg,applications/smb4k)

soundkonverter:	tdebase
	$(call buildpkg,applications/soundkonverter)

tastymenu:	tdebase pytdeextensions
	$(call buildpkg,applications/tastymenu)

tdedocker:	tdebase
	$(call buildpkg,applications/tdedocker)

tde-guidance:	tdebase pytdeextensions
	$(call buildpkg,applications/tde-guidance)

tdeio-apt:	tdebase
	$(call buildpkg,applications/tdeio-apt)

tdeio-ftps:	tdebase
	$(call buildpkg,applications/tdeio-ftps)

tdeio-gopher:	tdebase
	$(call buildpkg,applications/tdeio-gopher)

tdeio-locate:	tdebase
	$(call buildpkg,applications/tdeio-locate)

tdeio-sword:	tdebase sword
	$(call buildpkg,applications/tdeio-sword)

tdeio-umountwrapper:	tdebase
	$(call buildpkg,applications/tdeio-umountwrapper)

tdenetworkmanager:	tdebase
# Do NOT build on CentOS 5, CentOS 6
ifeq (,$(filter $(DIST),.el5 .el6))
	$(call buildpkg,applications/tdenetworkmanager)
endif

tdepowersave:	tdebase
# Do NOT build on CentOS 5
ifeq (,$(filter $(DIST),.el5))
	$(call buildpkg,applications/tdepowersave)
endif

tderadio:	tdebase
	$(call buildpkg,applications/tderadio)

tde-style-baghira: tdebase
	$(call buildpkg,applications/tde-style-baghira)

tde-style-domino: tdebase
	$(call buildpkg,applications/tde-style-domino)

tde-style-ia-ora: tdebase
	$(call buildpkg,applications/tde-style-ia-ora)

tde-style-lipstik:	tdebase
	$(call buildpkg,applications/tde-style-lipstik)

tde-style-qtcurve:	tdebase
	$(call buildpkg,applications/tde-style-qtcurve)

tdesudo:	tdebase
	$(call buildpkg,applications/tdesudo)

tdesvn:	tdebase
	$(call buildpkg,applications/tdesvn)

tde-systemsettings:	tdebase
	$(call buildpkg,applications/tde-systemsettings)

tdmtheme:	tdebase
	$(call buildpkg,applications/tdmtheme)

tellico:	tdebase tdemultimedia
# Do NOT build on CentOS 5
ifeq (,$(filter $(DIST),.el5))
	$(call buildpkg,applications/tellico)
endif

tork:	tdebase torsocks
	$(call buildpkg,applications/tork)

twin-style-crystal:	tdebase
	$(call buildpkg,applications/twin-style-crystal)

wlassistant:	tdebase
	$(call buildpkg,applications/wlassistant)

yakuake:	tdebase
	$(call buildpkg,applications/yakuake)

### Trinity Translations
gwenview-i18n:	tdebase
	$(call buildpkg,applications/gwenview-i18n)

k3b-i18n:	tdebase
# Do NOT build on CentOS 5
ifeq (,$(filter $(DIST),.el5))
	$(call buildpkg,applications/k3b-i18n)
endif

koffice-i18n:	tdebase
	$(call buildpkg,applications/koffice-i18n)

tde-i18n:	tdebase cmake
	$(call buildpkg,tde-i18n)

### Meta packages
meta:
	$(call buildpkg,extras/trinity-desktop)

### Extra packages
celestia:
	$(call buildpkg,extras/celestia)

fileshareset:
ifeq ($(wildcard /boot/vmlinuz*.mga6*),)
	$(call buildpkg,extras/fileshareset)
endif

icons-crystalsvg-updated:
	$(call buildpkg,extras/icons-crystalsvg-updated)

icons-kfaenza:
	$(call buildpkg,extras/icons-kfaenza)

icons-nuvola:
	$(call buildpkg,extras/icons-nuvola)

icons-oxygen:
	$(call buildpkg,extras/icons-oxygen)

kdevmon:
	$(call buildpkg,extras/kdevmon)

kdissert:
	$(call buildpkg,extras/kdissert)

klibido: pan
# Not on RHEL5, nor recent OpenSUSE
ifeq (,$(filter $(DIST),.el5 .oss150 .osstw))
	$(call buildpkg,extras/klibido)
endif

kompose:
	$(call buildpkg,extras/kompose)

koverartist:
	$(call buildpkg,extras/koverartist)

kpacman:
	$(call buildpkg,extras/kpacman)

mathemagics:
	$(call buildpkg,extras/mathemagics)

pan: gmime intltool
ifeq (,$(filter $(DIST),.el5 .oss150 .osstw))
	$(call buildpkg,3rdparty/pan)
endif

png2qrgb:
	$(call buildpkg,extras/png2qrgb)

scribus:
	$(call buildpkg,extras/scribus)

trinity-filesystem:
	$(call buildpkg,extras/trinity-filesystem)