summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2014-01-24 20:46:50 +0100
committerFrançois Andriot <albator78@libertysurf.fr>2014-01-24 20:46:50 +0100
commit43429e67cfc03fdf5065e90c197753ec5f15aa19 (patch)
tree3f85e6c48280c03682aa2aa92fca68fd9aa60634
parentdf55195d132cbe6af516c6f1883315f26abd7f4a (diff)
downloadtde-packaging-43429e67cfc03fdf5065e90c197753ec5f15aa19.tar.gz
tde-packaging-43429e67cfc03fdf5065e90c197753ec5f15aa19.zip
RPM Packaging: update build scripts
-rw-r--r--redhat/build/Makefile.r14575
-rw-r--r--redhat/build/Makefile.v3.5.13-sru506
-rwxr-xr-xredhat/build/build_rpm_package.sh51
-rwxr-xr-xredhat/build/get_installed_package_version.sh27
-rwxr-xr-xredhat/build/get_latest_built_package_filename.sh18
-rwxr-xr-xredhat/build/get_latest_built_package_version.sh18
-rwxr-xr-xredhat/build/get_latest_tarball_filename.sh23
-rwxr-xr-xredhat/build/get_latest_tarball_version.sh18
-rwxr-xr-xredhat/build/get_source_files.sh21
-rwxr-xr-xredhat/build/get_spec_version.sh18
-rwxr-xr-xredhat/build/get_specfile.sh29
-rwxr-xr-xredhat/build/install_rpm_package.sh45
-rwxr-xr-xredhat/build/is_latest_package_built.sh21
-rwxr-xr-xredhat/build/is_latest_package_installed.sh30
-rwxr-xr-xredhat/build/is_rpm_built.sh3
-rwxr-xr-xredhat/build/rpmdist.sh (renamed from redhat/rpmdist.sh)0
-rwxr-xr-xredhat/build/update_repository.sh15
17 files changed, 1418 insertions, 0 deletions
diff --git a/redhat/build/Makefile.r14 b/redhat/build/Makefile.r14
new file mode 100644
index 000000000..ac31b4913
--- /dev/null
+++ b/redhat/build/Makefile.r14
@@ -0,0 +1,575 @@
+SHELL := /bin/bash
+PATH := $(PATH):$(shell pwd)
+
+buildpkg = \
+ @echo "Now processing '$(1)' ."; \
+ if ! is_latest_package_installed.sh "$(1)" 14.0.0; then \
+ if ! is_latest_package_built.sh "$(1)" 14.0.0; then \
+ echo " Building package."; \
+ build_rpm_package.sh "$(1)" 14.0.0 || exit 1; \
+ echo " Updating repository."; \
+ update_repository.sh; \
+ fi; \
+ echo "Now installing package '$(1)'"; \
+ install_rpm_package.sh "$(1)" || exit 2; \
+ fi
+
+
+all: dependencies main libraries applications i18n meta
+dependencies: tqt3 tqtinterface arts libart_lgpl libcaldav libcarddav sip4-tqt tqca tqca-tls avahi-tqt dbus-tqt dbus-1-tqt akode
+main: tdelibs tdebase tdeaccessibility tdeadmin tdegames tdemultimedia tdepim tdetoys tdevelop tdeaddons tdeartwork tdebindings tdeedu tdegraphics tdenetwork tdesdk tdeutils tdewebdev
+libraries: 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 kftpgrabber kile kima kiosktool kkbswitch klcddimmer kmplayer kmyfirewall kmymoney knemo knetload knetstats knights knmap knowit knutclient koffice konversation kopete-otr kpicosim kpilot krecipes krename krusader kscope ksensors kshowmail kshutdown ksplash-engine-moodin ksquirrel kstreamripper ksystemlog ktechlab ktorrent kuickshow kvirc kvkbd kvpnc mplayerthumbs piklab potracegui qt4-tqt-theme-engine rosegarden smartcardauth smb4k soundkonverter tde-guidance tdeio-apt tdeio-ftps tdeio-locate tdeio-sword tdeio-umountwrapper tdenetworkmanager tdepowersave tderadio tde-style-lipstik tde-style-qtcurve tdesudo tdesvn tde-systemsettings tdmtheme tellico tork twin-style-crystal wlassistant yakuake
+i18n: gwenview-i18n k3b-i18n koffice-i18n tde-i18n
+
+
+# Dependencies
+arts: tqtinterface
+ $(call buildpkg,dependencies/arts)
+
+avahi-tqt: tqtinterface
+ $(call buildpkg,dependencies/avahi-tqt)
+
+dbus-1-tqt: tqtinterface
+ $(call buildpkg,dependencies/dbus-1-tqt)
+
+dbus-tqt: tqtinterface
+ $(call buildpkg,dependencies/dbus-tqt)
+
+libart_lgpl: tqtinterface
+ $(call buildpkg,dependencies/libart-lgpl)
+
+libcaldav: tqtinterface libcurl
+ $(call buildpkg,dependencies/libcaldav)
+
+libcarddav: tqtinterface
+ $(call buildpkg,dependencies/libcarddav)
+
+python-tqt: sip4-tqt tdelibs
+ $(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
+ $(call buildpkg,dependencies/tqtinterface)
+
+# Main packages
+tdeaccessibility: tdebase tdemultimedia
+ $(call buildpkg,tdeaccessibility)
+
+tdeaddons: tdebase tdegames tdemultimedia tdenetwork tdepim
+ $(call buildpkg,tdeaddons)
+
+tdeadmin: tdebase
+ $(call buildpkg,tdeadmin)
+
+tdeartwork: tdebase
+ $(call buildpkg,tdeartwork)
+
+tdebase: tdelibs
+ $(call buildpkg,tdebase)
+
+tdebindings: tdebase tqscintilla
+ $(call buildpkg,tdebindings)
+
+tdeedu: tdebase
+ $(call buildpkg,tdeedu)
+
+tdegames: tdebase tdemultimedia
+ $(call buildpkg,tdegames)
+
+tdegraphics: tdebase poppler
+ $(call buildpkg,tdegraphics)
+
+tdelibs: tqt3 tqtinterface arts dbus-tqt dbus-1-tqt
+ $(call buildpkg,tdelibs)
+
+tdemultimedia: tdebase akode
+ $(call buildpkg,tdemultimedia)
+
+tdenetwork: tdebase
+ $(call buildpkg,tdenetwork)
+
+tdepim: tdebase libcaldav libcarddav
+ $(call buildpkg,tdepim)
+
+tdesdk: tdebase tdebindings
+ $(call buildpkg,tdesdk)
+
+tdetoys: tdebase
+ $(call buildpkg,tdetoys)
+
+tdeutils: tdebase
+ $(call buildpkg,tdeutils)
+
+tdevelop: tdebase tdesdk
+ $(call buildpkg,tdevelop)
+
+tdewebdev: tdebase tdesdk
+ $(call buildpkg,tdewebdev)
+
+# 3rd party libraries and tools
+htdig:
+ $(call buildpkg,3rdparty/htdig)
+
+imlib1:
+# Do NOT build on Fedora
+ifeq ($(wildcard /etc/fedora-release),)
+ $(call buildpkg,3rdparty/imlib1)
+endif
+
+libcurl:
+# Build on CentOS 5 only
+ifneq ($(wildcard /boot/vmlinuz*.el5*),)
+ $(call buildpkg,3rdparty/curl)
+endif
+
+libotr3:
+# Build on Mageia only
+ifneq ($(wildcard /etc/mageia-release),)
+ $(call buildpkg,3rdparty/libotr3)
+endif
+
+lilypond: mftrace
+# Build on CentOS only
+ifneq ($(wildcard /etc/centos-release),)
+ $(call buildpkg,3rdparty/lilypond)
+endif
+
+mftrace:
+# Build on CentOS only
+ifneq ($(wildcard /etc/centos-release),)
+ $(call buildpkg,3rdparty/mftrace)
+endif
+
+pcsc-perl:
+# Build on CentOS and openSUSE only
+ifneq ($(wildcard /etc/centos-release /etc/SuSE-release),)
+ $(call buildpkg,3rdparty/pcsc-perl)
+endif
+
+poppler:
+# Build on CentOS 5 only
+ifneq ($(wildcard /boot/vmlinuz*.el5*),)
+ $(call buildpkg,3rdparty/poppler)
+endif
+
+python-qt3: tdelibs sip
+ $(call buildpkg,3rdparty/python-qt3)
+
+sip:
+# Build on CentOS 5 only
+ifneq ($(wildcard /boot/vmlinuz*.el5*),)
+ $(call buildpkg,3rdparty/sip)
+endif
+
+torsocks:
+ $(call buildpkg,3rdparty/torsocks)
+
+wv2:
+# Do NOT build on Mageia
+ifeq ($(wildcard /etc/mageia-release),)
+ $(call buildpkg,3rdparty/wv2)
+endif
+
+# Extra packages
+akode: tqtinterface
+ $(call buildpkg,extras/akode)
+
+# Libraries
+kipi-plugins: tqtinterface libkipi
+ $(call buildpkg,libraries/kipi-plugins)
+
+libkdcraw: tqtinterface
+ $(call buildpkg,libraries/libkdcraw)
+
+libkexiv2: tqtinterface
+ $(call buildpkg,libraries/libkexiv2)
+
+libkipi: tqtinterface
+ $(call buildpkg,libraries/libkipi)
+
+libksquirrel: tqtinterface
+ $(call buildpkg,libraries/libksquirrel)
+
+libtdeldap: tqtinterface
+ $(call buildpkg,libraries/libtdeldap)
+
+libtqt-perl: tqtinterface
+ $(call buildpkg,libraries/libtqt-perl)
+
+mlt: tqtinterface
+ $(call buildpkg,libraries/mlt)
+
+mlt++: tqtinterface
+ $(call buildpkg,libraries/mlt++)
+
+pytdeextensions: tqtinterface python-trinity
+ $(call buildpkg,libraries/pytdeextensions)
+
+python-trinity: tqtinterface python-tqt
+ $(call buildpkg,libraries/python-trinity)
+
+# Applications
+abakus: tdebase
+ $(call buildpkg,applications/abakus)
+
+adept: tdebase
+ $(call buildpkg,applications/adept)
+
+amarok: tdebase
+ $(call buildpkg,applications/amarok)
+
+basket: tdebase
+ $(call buildpkg,applications/basket)
+
+bibletime: tdebase
+ $(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
+ifeq ($(wildcard /etc/centos-release),)
+ $(call buildpkg,applications/gtk3-tqt-engine)
+endif
+
+gtk-qt-engine: tdebase
+# Do NOT build on CentOS 5
+ifeq ($(wildcard /boot/vmlinuz*.el5*),)
+ $(call buildpkg,applications/gtk-qt-engine)
+endif
+
+gwenview: tdebase
+ $(call buildpkg,applications/gwenview)
+
+k3b: tdebase
+ $(call buildpkg,applications/k3b)
+
+k9copy: tdebase k3b
+ $(call buildpkg,applications/k9copy)
+
+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
+ $(call buildpkg,applications/kcmldap)
+
+kcmldapcontroller: tdebase kcmldap
+ $(call buildpkg,applications/kcmldapcontroller)
+
+kcmldapmanager: tdebase kcmldap
+ $(call buildpkg,applications/kcmldapmanager)
+
+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
+ $(call buildpkg,applications/keep)
+
+kerberostray: tdebase
+ $(call buildpkg,applications/kerberostray)
+
+kerry: tdebase
+ $(call buildpkg,applications/kerry)
+
+kftpgrabber: tdebase
+ $(call buildpkg,applications/kftpgrabber)
+
+kgtk-qt3: tdebase
+ $(call buildpkg,applications/kgtk-qt3)
+
+kile: tdebase
+ $(call buildpkg,applications/kile)
+
+kima: tdebase
+ $(call buildpkg,applications/kima)
+
+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
+ $(call buildpkg,applications/kmymoney)
+
+knemo: tdebase
+ $(call buildpkg,applications/knemo)
+
+knetload: tdebase
+ $(call buildpkg,applications/knetload)
+
+knetstats: tdebase
+ $(call buildpkg,applications/knetstats)
+
+knetworkmanager8: tdebase
+ $(call buildpkg,applications/knetworkmanager8)
+
+knights: tdebase
+ $(call buildpkg,applications/knights)
+
+knmap: tdebase
+ $(call buildpkg,applications/knmap)
+
+knowit: tdebase
+ $(call buildpkg,applications/knowit)
+
+knutclient: tdebase
+ $(call buildpkg,applications/knutclient)
+
+koffice: tdebase wv2
+ $(call buildpkg,applications/koffice)
+
+konversation: tdebase
+ $(call buildpkg,applications/konversation)
+
+kopete-otr: tdebase
+ $(call buildpkg,applications/kopete-otr)
+
+kpicosim: tdebase
+ $(call buildpkg,applications/kpicosim)
+
+kpilot: tdebase
+ $(call buildpkg,applications/kpilot)
+
+kpowersave: tdebase
+ $(call buildpkg,applications/kpowersave)
+
+krecipes: tdebase
+ $(call buildpkg,applications/krecipes)
+
+krename: tdebase
+ $(call buildpkg,applications/krename)
+
+krusader: tdebase
+ $(call buildpkg,applications/krusader)
+
+kscope: tdebase
+ $(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 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)
+
+mplayerthumbs: tdebase
+ $(call buildpkg,applications/mplayerthumbs)
+
+piklab: tdebase
+ $(call buildpkg,applications/piklab)
+
+potracegui: tdebase
+ $(call buildpkg,applications/potracegui)
+
+qt4-tqt-theme-engine: tdebase
+ $(call buildpkg,applications/qt4-tqt-theme-engine)
+
+rosegarden: tdebase lilypond
+ $(call buildpkg,applications/rosegarden)
+
+smartcardauth: tdebase pcsc-perl
+ $(call buildpkg,applications/smartcardauth)
+
+smb4k: tdebase
+ $(call buildpkg,applications/smb4k)
+
+soundkonverter: tdebase
+ $(call buildpkg,applications/soundkonverter)
+
+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-locate: tdebase
+ $(call buildpkg,applications/tdeio-locate)
+
+tdeio-sword: tdebase
+ $(call buildpkg,applications/tdeio-sword)
+
+tdeio-umountwrapper: tdebase
+ $(call buildpkg,applications/tdeio-umountwrapper)
+
+tdenetworkmanager: tdebase
+ $(call buildpkg,applications/tdenetworkmanager)
+
+tdepowersave: tdebase
+ $(call buildpkg,applications/tdepowersave)
+
+tderadio: tdebase
+ $(call buildpkg,applications/tderadio)
+
+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
+ $(call buildpkg,applications/tellico)
+
+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)
+
+# Translations
+gwenview-i18n: tdebase
+ $(call buildpkg,applications/gwenview-i18n)
+
+k3b-i18n: tdebase
+ $(call buildpkg,applications/k3b-i18n)
+
+koffice-i18n: tdebase
+ $(call buildpkg,applications/koffice-i18n)
+
+tde-i18n: tdebase
+ $(call buildpkg,tde-i18n)
+
+# Meta packages
+meta:
+ $(call buildpkg,extras/trinity-desktop)
diff --git a/redhat/build/Makefile.v3.5.13-sru b/redhat/build/Makefile.v3.5.13-sru
new file mode 100644
index 000000000..013542c04
--- /dev/null
+++ b/redhat/build/Makefile.v3.5.13-sru
@@ -0,0 +1,506 @@
+SHELL := /bin/bash
+PATH := $(PATH):$(shell pwd)
+
+buildpkg = \
+ @echo "Now processing '$(1)' ."; \
+ if ! is_latest_package_installed.sh "$(1)" 3.5.13.2; then \
+ echo " Package '${1}' is not yet installed."; \
+ if ! is_latest_package_built.sh "$(1)" 3.5.13.2; then \
+ echo " Building package."; \
+ build_rpm_package.sh "$(1)" 3.5.13.2 || exit 1; \
+ echo " Updating repository."; \
+ update_repository.sh; \
+ fi; \
+ echo " Now installing package '$(1)'"; \
+ install_rpm_package.sh "$(1)" || exit 2; \
+ fi; \
+ echo
+
+
+all: dependencies main libraries applications i18n meta
+dependencies: qt3 tqtinterface arts libcaldav libcarddav tqca tqca-tls avahi-tqt dbus-tqt dbus-1-tqt akode hal
+main: tdelibs tdebase tdeaccessibility tdeadmin tdegames tdemultimedia tdepim tdetoys tdevelop tdeaddons tdeartwork tdebindings tdeedu tdegraphics tdenetwork tdesdk tdeutils tdewebdev
+libraries: libkdcraw libkexiv2 libkipi libksquirrel pytdeextensions python-trinity
+applications: abakus amarok basket bibletime digikam dolphin filelight gtk-qt-engine gwenview k3b k9copy kaffeine kaffeine-mozilla katapult kbarcode kbfx kbookreader kchmviewer kcmautostart kcpuload kdbusnotification kdiff3 kdirstat kgtk-qt3 keep kile kima kiosktool kmplayer kmyfirewall kmymoney knemo knetload knetstats knights knowit knutclient koffice konversation kopete-otr kpicosim kpilot krename krusader ksplash-engine-moodin ksquirrel kstreamripper ksystemlog ktechlab ktorrent kuickshow kvirc kvkbd piklab potracegui rosegarden smartcardauth smb4k soundkonverter tde-guidance tdeio-apt tdeio-locate tdeio-umountwrapper tderadio tde-style-lipstik tde-style-qtcurve tdesudo tdesvn tde-systemsettings tdmtheme tellico twin-style-crystal wlassistant yakuake
+i18n: gwenview-i18n k3b-i18n koffice-i18n tde-i18n
+
+
+### Trinity Dependencies
+arts: tqtinterface
+ $(call buildpkg,dependencies/arts)
+
+avahi-tqt: tqtinterface
+ $(call buildpkg,dependencies/avahi-tqt)
+
+dbus-1-tqt: tqtinterface
+ $(call buildpkg,dependencies/dbus-1-tqt)
+
+dbus-tqt: tqtinterface
+ $(call buildpkg,dependencies/dbus-tqt)
+
+libcaldav: tqtinterface libcurl
+ $(call buildpkg,dependencies/libcaldav)
+
+libcarddav: tqtinterface libcurl
+ $(call buildpkg,dependencies/libcarddav)
+
+tqca: tqtinterface
+ $(call buildpkg,dependencies/tqca)
+
+tqca-tls: tqtinterface tqca
+ $(call buildpkg,dependencies/tqca-tls)
+
+qt3:
+ $(call buildpkg,dependencies/qt3)
+
+tqtinterface: qt3
+ $(call buildpkg,dependencies/tqtinterface)
+
+# Main packages
+tdeaccessibility: tdebase tdemultimedia
+ $(call buildpkg,tdeaccessibility)
+
+tdeaddons: tdebase tdegames tdemultimedia tdenetwork tdepim
+ $(call buildpkg,tdeaddons)
+
+tdeadmin: tdebase
+ $(call buildpkg,tdeadmin)
+
+tdeartwork: tdebase
+ $(call buildpkg,tdeartwork)
+
+tdebase: tdelibs
+ $(call buildpkg,tdebase)
+
+tdebindings: tdebase
+ $(call buildpkg,tdebindings)
+
+tdeedu: tdebase
+ $(call buildpkg,tdeedu)
+
+tdegames: tdebase tdemultimedia
+ $(call buildpkg,tdegames)
+
+tdegraphics: tdebase poppler
+ $(call buildpkg,tdegraphics)
+
+tdelibs: qt3 tqtinterface arts dbus-tqt dbus-1-tqt
+ $(call buildpkg,tdelibs)
+
+tdemultimedia: tdebase akode
+ $(call buildpkg,tdemultimedia)
+
+tdenetwork: tdebase
+ $(call buildpkg,tdenetwork)
+
+tdepim: tdebase libcaldav libcarddav
+ $(call buildpkg,tdepim)
+
+tdesdk: tdebase tdebindings
+ $(call buildpkg,tdesdk)
+
+tdetoys: tdebase
+ $(call buildpkg,tdetoys)
+
+tdeutils: tdebase
+ $(call buildpkg,tdeutils)
+
+tdevelop: tdebase tdesdk
+ $(call buildpkg,tdevelop)
+
+tdewebdev: tdebase tdesdk
+ $(call buildpkg,tdewebdev)
+
+### 3rd party libraries and tools
+gnuchess:
+# Build on CentOS 5 only
+ifneq ($(wildcard /boot/vmlinuz*.el5*),)
+ $(call buildpkg,3rdparty/gnuchess)
+endif
+
+hal: hal-info
+# Do NOT build on CentOS
+ifneq ($(wildcard /etc/centos-release),)
+ $(call buildpkg,3rdparty/hal)
+endif
+
+hal-info:
+# Do NOT build on CentOS
+ifneq ($(wildcard /etc/centos-release),)
+ $(call buildpkg,3rdparty/hal-info)
+endif
+
+htdig:
+ $(call buildpkg,3rdparty/htdig)
+
+imlib1:
+# Do NOT build on Fedora, nor CentOS
+ifeq ($(wildcard /etc/fedora-release),)
+ifeq ($(wildcard /etc/centos-release),)
+ifeq ($(wildcard /boot/vmlinuz*.el5*),)
+ $(call buildpkg,3rdparty/imlib1)
+endif
+endif
+endif
+
+libcurl:
+# Build on CentOS 5 only
+ifneq ($(wildcard /boot/vmlinuz*.el5*),)
+ $(call buildpkg,3rdparty/curl)
+endif
+
+libotr3:
+# Build on Mageia only
+ifneq ($(wildcard /etc/mageia-release),)
+ $(call buildpkg,3rdparty/libotr3)
+endif
+
+lilypond: mftrace
+# Build on CentOS >= 6 only
+ifneq ($(wildcard /etc/centos-release),)
+ $(call buildpkg,3rdparty/lilypond)
+endif
+
+mftrace:
+# Build on CentOS >= only
+ifneq ($(wildcard /etc/centos-release),)
+ $(call buildpkg,3rdparty/mftrace)
+endif
+
+pcsc-perl:
+# Build on CentOS and openSUSE only
+ifneq ($(wildcard /etc/centos-release /etc/SuSE-release /boot/vmlinuz*.el5*),)
+ $(call buildpkg,3rdparty/pcsc-perl)
+endif
+
+poppler:
+# Build on CentOS 5 only (vendor-provided Poppler is too old)
+ifneq ($(wildcard /boot/vmlinuz*.el5*),)
+ $(call buildpkg,3rdparty/poppler)
+endif
+
+python-qt3: tdelibs sip
+ $(call buildpkg,3rdparty/python-qt3)
+
+sip:
+# Build on CentOS 5 only (vendor-provided SIP is too old)
+ifneq ($(wildcard /boot/vmlinuz*.el5*),)
+ $(call buildpkg,3rdparty/sip)
+endif
+
+wv2:
+# Do NOT build on Mageia (package already exists)
+ifeq ($(wildcard /etc/mageia-release),)
+ $(call buildpkg,3rdparty/wv2)
+endif
+
+### Extra packages
+akode: tqtinterface
+ $(call buildpkg,extras/akode)
+
+### Trinity Libraries
+kipi-plugins: tqtinterface libkipi
+ $(call buildpkg,libraries/kipi-plugins)
+
+libkdcraw: tqtinterface
+ $(call buildpkg,libraries/libkdcraw)
+
+libkexiv2: tqtinterface
+ $(call buildpkg,libraries/libkexiv2)
+
+libkipi: tqtinterface
+ $(call buildpkg,libraries/libkipi)
+
+libksquirrel: tqtinterface
+ $(call buildpkg,libraries/libksquirrel)
+
+mlt: tqtinterface
+ $(call buildpkg,libraries/mlt)
+
+mlt++: tqtinterface
+ $(call buildpkg,libraries/mlt++)
+
+pytdeextensions: tqtinterface python-trinity
+ $(call buildpkg,libraries/pytdeextensions)
+
+python-trinity: tqtinterface python-qt3
+ $(call buildpkg,libraries/python-trinity)
+
+### Trinity Applications
+abakus: tdebase
+ $(call buildpkg,applications/abakus)
+
+adept: tdebase
+ $(call buildpkg,applications/adept)
+
+amarok: tdebase
+ $(call buildpkg,applications/amarok)
+
+basket: tdebase
+ $(call buildpkg,applications/basket)
+
+bibletime: tdebase
+ $(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)
+
+gtk-qt-engine: tdebase
+# Do NOT build on CentOS 5 (GTK2 is too old)
+ifeq ($(wildcard /boot/vmlinuz*.el5*),)
+ $(call buildpkg,applications/gtk-qt-engine)
+endif
+
+gwenview: tdebase
+ $(call buildpkg,applications/gwenview)
+
+k3b: tdebase
+ $(call buildpkg,applications/k3b)
+
+k9copy: tdebase k3b
+ $(call buildpkg,applications/k9copy)
+
+kaffeine: tdebase
+ $(call buildpkg,applications/kaffeine)
+
+kaffeine-mozilla: tdebase kaffeine
+ $(call buildpkg,applications/kaffeine-mozilla)
+
+katapult: tdebase
+ $(call buildpkg,applications/katapult)
+
+kbarcode: tdebase
+ $(call buildpkg,applications/kbarcode)
+
+kbfx: tdebase
+ $(call buildpkg,applications/kbfx)
+
+kbookreader: tdebase
+ $(call buildpkg,applications/kbookreader)
+
+kchmviewer: tdebase
+ $(call buildpkg,applications/kchmviewer)
+
+kcmautostart: tdebase
+ $(call buildpkg,applications/kcmautostart)
+
+kcpuload: tdebase
+ $(call buildpkg,applications/kcpuload)
+
+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
+ $(call buildpkg,applications/keep)
+
+kerry: tdebase
+ $(call buildpkg,applications/kerry)
+
+kgtk-qt3: tdebase
+# Do NOT build on CentOS 5 (GTK2 is too old)
+ifeq ($(wildcard /boot/vmlinuz*.el5*),)
+ $(call buildpkg,applications/kgtk-qt3)
+endif
+
+kile: tdebase
+ $(call buildpkg,applications/kile)
+
+kima: tdebase
+ $(call buildpkg,applications/kima)
+
+kiosktool: tdebase
+ $(call buildpkg,applications/kiosktool)
+
+kmplayer: tdebase
+ $(call buildpkg,applications/kmplayer)
+
+kmyfirewall: tdebase
+ $(call buildpkg,applications/kmyfirewall)
+
+kmymoney: tdebase
+ $(call buildpkg,applications/kmymoney)
+
+knemo: tdebase
+ $(call buildpkg,applications/knemo)
+
+knetload: tdebase
+ $(call buildpkg,applications/knetload)
+
+knetstats: tdebase
+ $(call buildpkg,applications/knetstats)
+
+knetworkmanager8: tdebase
+ $(call buildpkg,applications/knetworkmanager8)
+
+knights: tdebase gnuchess
+ $(call buildpkg,applications/knights)
+
+knowit: tdebase
+ $(call buildpkg,applications/knowit)
+
+knutclient: tdebase
+ $(call buildpkg,applications/knutclient)
+
+koffice: tdebase wv2
+ $(call buildpkg,applications/koffice)
+
+konversation: tdebase
+ $(call buildpkg,applications/konversation)
+
+kopete-otr: tdebase
+ $(call buildpkg,applications/kopete-otr)
+
+kpicosim: tdebase
+ $(call buildpkg,applications/kpicosim)
+
+kpilot: tdebase
+# Do NOT build on CentOS 5
+ifeq ($(wildcard /boot/vmlinuz*.el5*),)
+ $(call buildpkg,applications/kpilot)
+endif
+
+kpowersave: tdebase
+ $(call buildpkg,applications/kpowersave)
+
+krename: tdebase
+ $(call buildpkg,applications/krename)
+
+krusader: tdebase
+ $(call buildpkg,applications/krusader)
+
+ksplash-engine-moodin: tdebase
+ $(call buildpkg,applications/ksplash-engine-moodin)
+
+ksquirrel: tdebase 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)
+
+piklab: tdebase
+ $(call buildpkg,applications/piklab)
+
+potracegui: tdebase
+ $(call buildpkg,applications/potracegui)
+
+rosegarden: tdebase lilypond
+# Do NOT build on CentOS 5
+ifeq ($(wildcard /boot/vmlinuz*.el5*),)
+ $(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)
+
+tde-guidance: tdebase pytdeextensions
+ $(call buildpkg,applications/tde-guidance)
+
+tdeio-apt: tdebase
+ $(call buildpkg,applications/tdeio-apt)
+
+tdeio-locate: tdebase
+ $(call buildpkg,applications/tdeio-locate)
+
+tdeio-umountwrapper: tdebase
+ $(call buildpkg,applications/tdeio-umountwrapper)
+
+tderadio: tdebase
+ $(call buildpkg,applications/tderadio)
+
+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
+ $(call buildpkg,applications/tellico)
+
+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
+ $(call buildpkg,applications/k3b-i18n)
+
+koffice-i18n: tdebase
+ $(call buildpkg,applications/koffice-i18n)
+
+tde-i18n: tdebase
+ $(call buildpkg,tde-i18n)
+
+### Meta packages
+meta:
+ $(call buildpkg,extras/trinity-desktop)
diff --git a/redhat/build/build_rpm_package.sh b/redhat/build/build_rpm_package.sh
new file mode 100755
index 000000000..5b274fde2
--- /dev/null
+++ b/redhat/build/build_rpm_package.sh
@@ -0,0 +1,51 @@
+#!/bin/bash -ex
+
+# Usage: build_rpm_package.sh <TDE_PACKAGE> [TDE_VERSION]
+# Example: build_rpm_package.sh tdebase 14.0.0
+
+
+PKGNAME="${1##*/}"
+TDE_VERSION="${2:-14.0.0}"
+
+SPECFILE=$(get_specfile.sh ${PKGNAME} ${TDE_VERSION})
+SOURCES=$(get_source_files.sh ${PKGNAME} ${TDE_VERSION})
+TARBALL=$(get_latest_tarball_filename.sh ${PKGNAME} ${TDE_VERSION} || :)
+VERSION=$(get_latest_tarball_version.sh ${PKGNAME} ${TDE_VERSION} || :)
+case "${VERSION}" in *~pre*) PREVERSION="${VERSION#*~}";; esac
+
+DIST="$(rpmdist.sh --dist)"
+BUILDDIR="/dev/shm/BUILD${DIST}.$(uname -i)"
+BUILDROOTDIR="/dev/shm/BUILDROOT${DIST}.$(uname -i)"
+LOGFILE=/tmp/log.${COMP##*/}
+
+TEMPDIR="$(mktemp -d)"
+cp -f ${SPECFILE} ${SOURCES} ${TARBALL} "${TEMPDIR}"
+
+# Determines if we are running an i386 or x86_64 distro
+if [ "$(rpm -q --qf '%{arch}\n' kernel | tail -n 1)" = "i686" ]; then
+ ARGS="${ARGS} --target=i686"
+fi
+
+[ -d "${BUILDDIR}" ] || mkdir -p "${BUILDDIR}"
+
+
+rpmbuild -ba \
+ --define "_specdir ${TEMPDIR}" \
+ --define "_sourcedir ${TEMPDIR}" \
+ --define "_builddir ${BUILDDIR}" \
+ --define "_buildrootdir ${BUILDROOTDIR}" \
+ --define "tde_version ${TDE_VERSION}" \
+ --define "tde_prefix /opt/trinity" \
+ --define "preversion ${PREVERSION}" \
+ ${ARGS} \
+ "${SPECFILE}"
+RET=$?
+
+# Removes BUILDDIR if build succeeded
+if [ ${RET} -eq 0 ]; then
+ rm -rf "${BUILDDIR}/"*${PKGNAME}-${VERSION}*
+fi
+
+rm -rf "${TEMPDIR}"
+
+exit $RET
diff --git a/redhat/build/get_installed_package_version.sh b/redhat/build/get_installed_package_version.sh
new file mode 100755
index 000000000..1fced7d42
--- /dev/null
+++ b/redhat/build/get_installed_package_version.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+# Sample package name: trinity-tdelibs-14.0.0-0_pre727+6be06b3d.mga3.opt
+
+PKGNAME="${1##*/}"
+[ -z "${PKGNAME}" ] && echo "You must specify a package name !" && exit 1
+
+# Language package: install only French language package
+case ${PKGNAME} in
+ "k3b-i18n"|"koffice-i18n"|"tde-i18n") PKGNAME="${PKGNAME}-French";;
+ "koffice") PKGNAME="${PKGNAME}-suite";;
+ "trinity-"*) PKGNAME="${PKGNAME#trinity-}";;
+ "qt3") [ -r /etc/mandriva-release ] && PKGNAME="qt3-common";;
+ "curl") PKGNAME="trinity-libcurl";;
+esac
+
+VERSION=$(LC_ALL=C rpm -q --qf "%{version}-%{release}" trinity-${PKGNAME} 2>/dev/null)
+if [ -z "${VERSION}" ] || [[ "${VERSION}" =~ "not installed" ]]; then
+ VERSION=$(LC_ALL=C rpm -q --qf "%{version}-%{release}" ${PKGNAME})
+fi
+
+VERSION=${VERSION/-*_/\~}
+VERSION=${VERSION%-[0-9]}
+VERSION=${VERSION%.opt}
+VERSION=${VERSION%.*}
+
+echo $VERSION
diff --git a/redhat/build/get_latest_built_package_filename.sh b/redhat/build/get_latest_built_package_filename.sh
new file mode 100755
index 000000000..2d9f9ee39
--- /dev/null
+++ b/redhat/build/get_latest_built_package_filename.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+PKGNAME="$1"
+[ -z "${PKGNAME}" ] && echo "You must specify a package name !" && exit 1
+
+RPMDIR=$(rpm -E %_rpmdir)
+
+RPM=$(find ${RPMDIR} -name "trinity-${PKGNAME}-[0-9]*.rpm" | sort -n | tail -n 1)
+
+if [ ! -r "${RPM}" ]; then
+ RPM=$(find ${RPMDIR} -name "${PKGNAME}-[0-9]*.rpm" | sort -n | tail -n 1)
+ if [ ! -r "${RPM}" ]; then
+ echo "Error, cannot find any package for '${PKGNAME}' !"
+ exit 1
+ fi
+fi
+
+echo $RPM
diff --git a/redhat/build/get_latest_built_package_version.sh b/redhat/build/get_latest_built_package_version.sh
new file mode 100755
index 000000000..fa649c30f
--- /dev/null
+++ b/redhat/build/get_latest_built_package_version.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+PKGNAME="$1"
+TDE_VERSION="${2:-14.0.0}"
+
+[ -z "${PKGNAME}" ] && echo "You must specify a package name !" && exit 1
+
+RPM=$(get_latest_built_package_filename.sh "${PKGNAME}")
+
+[ ! -r "${RPM}" ] && echo "No package found for '${PKGNAME}' !" && exit 2
+
+VERSION=$(rpm -qp --qf "%{version}-%{release}" "${RPM}")
+VERSION=${VERSION%.opt}
+VERSION=${VERSION%.*}
+VERSION=${VERSION/-*_/\~}
+
+
+echo $VERSION
diff --git a/redhat/build/get_latest_tarball_filename.sh b/redhat/build/get_latest_tarball_filename.sh
new file mode 100755
index 000000000..8cc39f65d
--- /dev/null
+++ b/redhat/build/get_latest_tarball_filename.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+PKGNAME="${1##*/}"
+TDE_VERSION="${2:-14.0.0}"
+
+[ -z "${PKGNAME}" ] && echo "You must specify a package name !" && exit 1
+[ -d "${TARBALLS_DIR}" ] || TARBALLS_DIR=~/tde/tde-tarballs/${TDE_VERSION}/
+[ -d "${PACKAGING_DIR}" ] || PACKAGING_DIR=~/tde/tde-packaging/redhat/
+
+RET=$(find "${TARBALLS_DIR}" -name "trinity-${PKGNAME}-[0-9]*.tar.gz" | sort -n | tail -n 1)
+if [ ! -r "${RET}" ]; then
+ # Retry without 'trinity-*', and allow any TAR extension.
+ RET=$(find "${PACKAGING_DIR}" -name "${PKGNAME}-[0-9]*.tar*" | sort -n | tail -n 1)
+ if [ ! -r "${RET}" ]; then
+ # Retry by removing numbers in package name, e.g "imlib1" => "imlib"
+ RET=$(find "${PACKAGING_DIR}" -name "$(tr -d "[0-9]" <<< ${PKGNAME})-[0-9]*.tar*" | sort -n | tail -n 1)
+ fi
+fi
+
+[ -z "${RET}" ] && exit 2
+
+echo "${RET}"
+exit 0
diff --git a/redhat/build/get_latest_tarball_version.sh b/redhat/build/get_latest_tarball_version.sh
new file mode 100755
index 000000000..b12d63cdd
--- /dev/null
+++ b/redhat/build/get_latest_tarball_version.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+PKGNAME="${1##*/}"
+TDE_VERSION="${2:-14.0.0}"
+
+[ -z "${PKGNAME}" ] && echo "You must specify a package name !" && exit 1
+
+TARBALL=$(get_latest_tarball_filename.sh "${PKGNAME}" ${TDE_VERSION})
+
+[ ! -r "${TARBALL}" ] && echo "No tarball found for '${PKGNAME}' !" && exit 2
+
+VERSION=${TARBALL##*/}
+VERSION=${VERSION#trinity-}
+VERSION=${VERSION#${PKGNAME}-}
+VERSION=${VERSION#*-}
+VERSION=${VERSION%.tar.gz}
+VERSION=${VERSION%.tar.bz2}
+echo "$VERSION"
diff --git a/redhat/build/get_source_files.sh b/redhat/build/get_source_files.sh
new file mode 100755
index 000000000..b52c023e8
--- /dev/null
+++ b/redhat/build/get_source_files.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+PKGNAME="${1##*/}"
+TDE_VERSION="${2:-14.0.0}"
+
+[ -z "${PKGNAME}" ] && echo "You must specify a package name !" && exit 1
+SPECFILE=$(get_specfile.sh ${PKGNAME} ${TDE_VERSION})
+SPECDIR="${SPECFILE%/*}"
+
+[ ! -r "${SPECFILE}" ] && exit 2
+
+while read var val; do
+ case "${var}" in
+ Source[0-9]*:|Source:|Patch[0-9]*:)
+ FILE=$(rpm -E "${SPECDIR}/${val##*/}")
+ if [ -r "${FILE}" ]; then
+ echo "${FILE}"
+ fi
+ ;;
+ esac
+done < "${SPECFILE}"
diff --git a/redhat/build/get_spec_version.sh b/redhat/build/get_spec_version.sh
new file mode 100755
index 000000000..82c61dcd8
--- /dev/null
+++ b/redhat/build/get_spec_version.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+PKGNAME="${1##*/}"
+TDE_VERSION="${2:-14.0.0}"
+
+[ -z "${PKGNAME}" ] && echo "You must specify a package name !" && exit 1
+
+SPECFILE=$(get_specfile.sh ${PKGNAME} ${TDE_VERSION})
+
+[ ! -r "${SPECFILE}" ] && exit 2
+
+VERSION=$(sed -n "/^Version:/ s/Version:[ ]*//p" ${SPECFILE})
+RELEASE=$(sed -n "/^Release:/ s/Release:[ ]*//p" ${SPECFILE})
+VERSION=$(rpm -E "${VERSION}")
+RELEASE=$(rpm -E "${RELEASE}")
+RELEASE=${RELEASE%$(rpmdist.sh --dist)}
+
+echo ${VERSION}-${RELEASE}
diff --git a/redhat/build/get_specfile.sh b/redhat/build/get_specfile.sh
new file mode 100755
index 000000000..d60748604
--- /dev/null
+++ b/redhat/build/get_specfile.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+PKGNAME="${1##*/}"
+TDE_VERSION="${2:-14.0.0}"
+
+[ -z "${PKGNAME}" ] && echo "You must specify a package name !" && exit 1
+
+[ -d "${TDE_SPECDIR}" ] || TDE_SPECDIR=~/tde/tde-packaging/redhat
+
+# Special case for QT3
+if [ "${PKGNAME}" = "qt3" ]; then
+ case "$(rpmdist.sh --dist)" in
+ .oss*) TDE_SPECDIR=~/tde/tde-packaging/opensuse ;;
+ .mga*|.mdk*|.pclos*) TDE_SPECDIR=~/tde/tde-packaging/mageia ;;
+ esac
+fi
+
+SPECFILE=$(find "${TDE_SPECDIR}" -name "${PKGNAME}-${TDE_VERSION}.spec")
+if [ ! -r "${SPECFILE}" ]; then
+ SPECFILE=$(find "${TDE_SPECDIR}" -name "${PKGNAME}.spec")
+ if [ ! -r "${SPECFILE}" ]; then
+ SPECFILE=$(find "${TDE_SPECDIR}" -name "trinity-${PKGNAME}-${TDE_VERSION}.spec")
+ if [ ! -r "${SPECFILE}" ]; then
+ SPECFILE=$(find "${TDE_SPECDIR}" -name "trinity-${PKGNAME}.spec")
+ fi
+ fi
+fi
+
+echo ${SPECFILE}
diff --git a/redhat/build/install_rpm_package.sh b/redhat/build/install_rpm_package.sh
new file mode 100755
index 000000000..8c9973037
--- /dev/null
+++ b/redhat/build/install_rpm_package.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+PKGCATEGORY="${1%%/*}"
+PKGNAME="${1##*/}"
+
+if [ -x /usr/sbin/urpmi ]; then
+ PKGINST='sudo urpmi --auto --no-verify-rpm'
+elif [ -x /usr/bin/zypper ]; then
+ PKGINST="sudo zypper install -y"
+elif [ -x /usr/bin/yum ]; then
+ PKGINST='sudo yum install -y'
+elif [ -x /usr/bin/apt-get ]; then
+ PKGINST='sudo apt-get install -y'
+fi
+
+# Language package: install only French language package
+case "${PKGNAME}" in
+ "k3b-i18n"|"koffice-i18n"|"tde-i18n") PKGNAME="${PKGNAME}-French";;
+ "koffice") PKGNAME="${PKGNAME}-suite";;
+esac
+
+# Trinity Prefix, or not.
+case "${PKGNAME}" in
+ "trinity-"*|"qt3"|"python-qt3") PREFIX="";;
+ "gnuchess"|"imlib1"|"lilypond"|"mftrace"|"pcsc-perl"|"torsocks"|"wv2") PREFIX="";;
+ "curl") PREFIX="trinity-lib";;
+ *) PREFIX="trinity-";;
+esac
+
+# Installing main package
+eval ${PKGINST} "${PREFIX}${PKGNAME}" || exit 1
+
+# Installing development package
+
+# Applications do NOT have development packages
+case "${PKGCATEGORY}" in
+ "applications") if [ "${PKGNAME}" != "k3b" ]; then exit 0; fi;;
+esac
+# Other packags NOT having development package
+case "${PKGNAME}" in
+ "hal-info"|"lilypond"|"mftrace"|"pcsc-perl"|"torsocks") exit 0;;
+ "tqca-tls"|"tdeadmin"|"tdetoys"|"tde-i18n"*|"tdeaddons"|"tdeartwork"|"libtqt-perl") exit 0;;
+esac
+
+eval ${PKGINST} "${PREFIX}${PKGNAME}-devel"
diff --git a/redhat/build/is_latest_package_built.sh b/redhat/build/is_latest_package_built.sh
new file mode 100755
index 000000000..4cec2702e
--- /dev/null
+++ b/redhat/build/is_latest_package_built.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+PKGNAME="${1##*/}"
+TDE_VERSION="${2:-14.0.0}"
+
+BUILT=$(get_latest_built_package_version.sh ${PKGNAME} ${TDE_VERSION})
+TARBALL=$(get_latest_tarball_version.sh ${PKGNAME} ${TDE_VERSION})
+
+if [ "${BUILT/\~/}" != "${BUILT}" ]; then
+ if [ "${BUILT#*\~}" = "${TARBALL#*\~}" ]; then
+ echo "Latest package '${PKGNAME}' version '${BUILT}' is already built."
+ exit 0
+ fi
+else
+ if [ "${TARBALL%-*}" = "${BUILT%-*}" ]; then
+ echo "Latest package '${PKGNAME}' version '${BUILT}' is already built."
+ exit 0
+ fi
+fi
+
+exit 1
diff --git a/redhat/build/is_latest_package_installed.sh b/redhat/build/is_latest_package_installed.sh
new file mode 100755
index 000000000..6e1ed79d0
--- /dev/null
+++ b/redhat/build/is_latest_package_installed.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+PKGNAME="${1##*/}"
+TDE_VERSION="${2:-14.0.0}"
+
+INSTALLED=$(get_installed_package_version.sh ${PKGNAME})
+TARBALL=$(get_latest_tarball_version.sh ${PKGNAME} ${TDE_VERSION})
+SPEC=$(get_spec_version.sh ${PKGNAME} ${TDE_VERSION})
+
+# Package containing "~" (e.g. R14 preversion tarballs):
+if [ "${INSTALLED/\~/}" != "${INSTALLED}" ]; then
+ if [ "${INSTALLED#*\~}" = "${TARBALL#*\~}" ]; then
+ echo "Latest package '${PKGNAME}' version '${TARBALL}' is already built and installed."
+ exit 0
+ fi
+else
+ # Other package (e.g. akode)
+ if [ "${INSTALLED%-*}" = "${TARBALL%-*}" ]; then
+ echo "Latest package '${PKGNAME}' version '${INSTALLED}' is already built and installed."
+ exit 0
+ fi
+
+ # Other package (e.g. QT3)
+ if [ "${INSTALLED}" = "${SPEC}" ]; then
+ echo "Latest package '${PKGNAME}' version '${INSTALLED}' is already built and installed."
+ exit 0
+ fi
+fi
+
+exit 1
diff --git a/redhat/build/is_rpm_built.sh b/redhat/build/is_rpm_built.sh
new file mode 100755
index 000000000..5cd4b0595
--- /dev/null
+++ b/redhat/build/is_rpm_built.sh
@@ -0,0 +1,3 @@
+#!/bin/bash -x
+
+RPMDIR=$(rpm -E %_rpmdir)
diff --git a/redhat/rpmdist.sh b/redhat/build/rpmdist.sh
index 047fbfaa6..047fbfaa6 100755
--- a/redhat/rpmdist.sh
+++ b/redhat/build/rpmdist.sh
diff --git a/redhat/build/update_repository.sh b/redhat/build/update_repository.sh
new file mode 100755
index 000000000..bdd2f0f4f
--- /dev/null
+++ b/redhat/build/update_repository.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+WORKERS=$(getconf _NPROCESSORS_ONLN)
+
+if [ -x /usr/sbin/urpmi ]; then
+ REPOUPDATE='(cd $(rpm -E %{_rpmdir}); genhdlist2 --clean --allow-empty noarch; genhdlist2 --clean --allow-empty $(uname -i); sudo urpmi.update rpmbuild.$(uname -i) rpmbuild.noarch)'
+elif [ -x /usr/bin/zypper ]; then
+ REPOUPDATE='(cd $(rpm -E %{_rpmdir}); createrepo --workers=${WORKERS} $(uname -i); createrepo --workers=${WORKERS} noarch; sudo zypper refresh rpmbuild.$(uname -i) rpmbuild.noarch)'
+elif [ -x /usr/bin/yum ]; then
+ REPOUPDATE='(cd $(rpm -E %{_rpmdir}); createrepo $(uname -i); createrepo noarch; sudo yum clean all --disablerepo="*" --enablerepo="rpmbuild*")'
+elif [ -x /usr/bin/apt-get ]; then
+ REPOUPDATE='(cd $(rpm -E %{_rpmdir}); genpkglist $PWD noarch; genpkglist $PWD i586; genpkglist $PWD x86_64; genbasedir $PWD i586 x86_64 noarch; sudo apt-get update)'
+fi
+
+eval ${REPOUPDATE} || exit 1