RPM Packaging: update build scripts

pull/3/head
François Andriot 11 years ago
parent 61c9cb24d0
commit 7b26da834f

@ -1,18 +1,21 @@
SHELL := /bin/bash SHELL := /bin/bash
PATH := $(PATH):$(shell pwd) PATH := $(PATH)/build:$(shell pwd)
TDE_VERSION = 14.0.0
buildpkg = \ buildpkg = \
@echo "Now processing '$(1)' ."; \ @echo "Now processing '$(1)' ."; \
if ! is_latest_package_installed.sh "$(1)" 14.0.0; then \ if ! is_latest_package_installed.sh "$(1)" ${TDE_VERSION}; then \
if ! is_latest_package_built.sh "$(1)" 14.0.0; then \ echo " Package '${1}' is not yet installed."; \
if ! is_latest_package_built.sh "$(1)" ${TDE_VERSION}; then \
echo " Building package."; \ echo " Building package."; \
build_rpm_package.sh "$(1)" 14.0.0 || exit 1; \ build_rpm_package.sh "$(1)" ${TDE_VERSION} || exit 1; \
echo " Updating repository."; \ echo " Updating repository."; \
update_repository.sh; \ update_repository.sh ${TDE_VERSION}; \
fi; \ fi; \
echo "Now installing package '$(1)'"; \ echo "Now installing package '$(1)'"; \
install_rpm_package.sh "$(1)" || exit 2; \ install_rpm_package.sh "$(1)" || exit 2; \
fi fi; \
echo
all: dependencies main libraries applications i18n meta all: dependencies main libraries applications i18n meta
@ -23,7 +26,7 @@ applications: abakus amarok basket bibletime digikam dolphin filelight gtk3-tqt-
i18n: gwenview-i18n k3b-i18n koffice-i18n tde-i18n i18n: gwenview-i18n k3b-i18n koffice-i18n tde-i18n
# Dependencies ### Trinity Dependencies
arts: tqtinterface esound arts: tqtinterface esound
$(call buildpkg,dependencies/arts) $(call buildpkg,dependencies/arts)
@ -42,7 +45,7 @@ libart_lgpl: tqtinterface
libcaldav: tqtinterface libcurl libcaldav: tqtinterface libcurl
$(call buildpkg,dependencies/libcaldav) $(call buildpkg,dependencies/libcaldav)
libcarddav: tqtinterface libcarddav: tqtinterface libcurl
$(call buildpkg,dependencies/libcarddav) $(call buildpkg,dependencies/libcarddav)
python-tqt: sip4-tqt tdelibs python-tqt: sip4-tqt tdelibs
@ -79,7 +82,7 @@ tdeadmin: tdebase
tdeartwork: tdebase tdeartwork: tdebase
$(call buildpkg,tdeartwork) $(call buildpkg,tdeartwork)
tdebase: tdelibs tdebase: tdelibs htdig
$(call buildpkg,tdebase) $(call buildpkg,tdebase)
tdebindings: tdebase tqscintilla tdebindings: tdebase tqscintilla
@ -121,21 +124,34 @@ tdevelop: tdebase tdesdk
tdewebdev: tdebase tdesdk tdewebdev: tdebase tdesdk
$(call buildpkg,tdewebdev) $(call buildpkg,tdewebdev)
# 3rd party libraries and tools ### 3rd party libraries and tools
esound: esound:
# Build on Mageia only # Build on Mageia only
ifneq ($(wildcard /etc/mageia-release),) ifneq ($(wildcard /etc/mageia-release),)
$(call buildpkg,3rdparty/esound) $(call buildpkg,3rdparty/esound)
endif endif
gnuchess:
# Build on CentOS 5 only
ifneq ($(wildcard /boot/vmlinuz*.el5*),)
$(call buildpkg,3rdparty/gnuchess)
endif
htdig: htdig:
# build on Mageia only
ifneq ($(wildcard /etc/mageia-release),)
$(call buildpkg,3rdparty/htdig) $(call buildpkg,3rdparty/htdig)
endif
imlib1: imlib1:
# Do NOT build on Fedora / CentOS # Do NOT build on Fedora, nor CentOS
ifeq ($(wildcard /etc/fedora-release /etc/centos-release),) ifeq ($(wildcard /etc/fedora-release),)
ifeq ($(wildcard /etc/centos-release),)
ifeq ($(wildcard /boot/vmlinuz*.el5*),)
$(call buildpkg,3rdparty/imlib1) $(call buildpkg,3rdparty/imlib1)
endif endif
endif
endif
libcurl: libcurl:
# Build on CentOS 5 only # Build on CentOS 5 only
@ -163,12 +179,12 @@ endif
pcsc-perl: pcsc-perl:
# Build on CentOS and openSUSE only # Build on CentOS and openSUSE only
ifneq ($(wildcard /etc/centos-release /etc/SuSE-release),) ifneq ($(wildcard /etc/centos-release /etc/SuSE-release /boot/vmlinuz*.el5*),)
$(call buildpkg,3rdparty/pcsc-perl) $(call buildpkg,3rdparty/pcsc-perl)
endif endif
poppler: poppler:
# Build on CentOS 5 only # Build on CentOS 5 only (vendor-provided Poppler is too old)
ifneq ($(wildcard /boot/vmlinuz*.el5*),) ifneq ($(wildcard /boot/vmlinuz*.el5*),)
$(call buildpkg,3rdparty/poppler) $(call buildpkg,3rdparty/poppler)
endif endif
@ -177,7 +193,7 @@ python-qt3: tdelibs sip
$(call buildpkg,3rdparty/python-qt3) $(call buildpkg,3rdparty/python-qt3)
sip: sip:
# Build on CentOS 5 only # Build on CentOS 5 only (vendor-provided SIP is too old)
ifneq ($(wildcard /boot/vmlinuz*.el5*),) ifneq ($(wildcard /boot/vmlinuz*.el5*),)
$(call buildpkg,3rdparty/sip) $(call buildpkg,3rdparty/sip)
endif endif
@ -197,11 +213,11 @@ ifeq ($(wildcard /etc/mageia-release /etc/SuSE-release /etc/pclinuxos-release),)
$(call buildpkg,3rdparty/wv2) $(call buildpkg,3rdparty/wv2)
endif endif
# Extra packages ### Extra packages
akode: tqtinterface akode: tqtinterface
$(call buildpkg,extras/akode) $(call buildpkg,extras/akode)
# Libraries ### Trinity Libraries
kipi-plugins: tqtinterface libkipi kipi-plugins: tqtinterface libkipi
$(call buildpkg,libraries/kipi-plugins) $(call buildpkg,libraries/kipi-plugins)
@ -235,7 +251,7 @@ pytdeextensions: tqtinterface python-trinity
python-trinity: tqtinterface python-tqt python-trinity: tqtinterface python-tqt
$(call buildpkg,libraries/python-trinity) $(call buildpkg,libraries/python-trinity)
# Applications ### Trinity Applications
abakus: tdebase abakus: tdebase
$(call buildpkg,applications/abakus) $(call buildpkg,applications/abakus)
@ -279,7 +295,7 @@ ifeq ($(wildcard /etc/centos-release),)
endif endif
gtk-qt-engine: tdebase gtk-qt-engine: tdebase
# Do NOT build on CentOS 5 # Do NOT build on CentOS 5 (GTK2 is too old)
ifeq ($(wildcard /boot/vmlinuz*.el5*),) ifeq ($(wildcard /boot/vmlinuz*.el5*),)
$(call buildpkg,applications/gtk-qt-engine) $(call buildpkg,applications/gtk-qt-engine)
endif endif
@ -366,7 +382,11 @@ kftpgrabber: tdebase
$(call buildpkg,applications/kftpgrabber) $(call buildpkg,applications/kftpgrabber)
kgtk-qt3: tdebase kgtk-qt3: tdebase
# Do NOT build on CentOS 5 (GTK2 is too old)
# Do NOT build on Fedora >= 20 (GTK2 is too new)
ifeq ($(wildcard /boot/vmlinuz*.el5* /boot/vmlinuz*.fc20*),)
$(call buildpkg,applications/kgtk-qt3) $(call buildpkg,applications/kgtk-qt3)
endif
kile: tdebase kile: tdebase
$(call buildpkg,applications/kile) $(call buildpkg,applications/kile)
@ -404,7 +424,7 @@ knetstats: tdebase
knetworkmanager8: tdebase knetworkmanager8: tdebase
$(call buildpkg,applications/knetworkmanager8) $(call buildpkg,applications/knetworkmanager8)
knights: tdebase knights: tdebase gnuchess
$(call buildpkg,applications/knights) $(call buildpkg,applications/knights)
knmap: tdebase knmap: tdebase
@ -429,7 +449,10 @@ kpicosim: tdebase
$(call buildpkg,applications/kpicosim) $(call buildpkg,applications/kpicosim)
kpilot: tdebase kpilot: tdebase
# Do NOT build on CentOS 5
ifeq ($(wildcard /boot/vmlinuz*.el5*),)
$(call buildpkg,applications/kpilot) $(call buildpkg,applications/kpilot)
endif
kpowersave: tdebase kpowersave: tdebase
$(call buildpkg,applications/kpowersave) $(call buildpkg,applications/kpowersave)
@ -501,7 +524,10 @@ ifeq ($(wildcard /etc/centos-release),)
endif endif
rosegarden: tdebase lilypond rosegarden: tdebase lilypond
# Do NOT build on CentOS 5
ifeq ($(wildcard /boot/vmlinuz*.el5*),)
$(call buildpkg,applications/rosegarden) $(call buildpkg,applications/rosegarden)
endif
smartcardauth: tdebase pcsc-perl smartcardauth: tdebase pcsc-perl
$(call buildpkg,applications/smartcardauth) $(call buildpkg,applications/smartcardauth)
@ -575,7 +601,7 @@ wlassistant: tdebase
yakuake: tdebase yakuake: tdebase
$(call buildpkg,applications/yakuake) $(call buildpkg,applications/yakuake)
# Translations ### Trinity Translations
gwenview-i18n: tdebase gwenview-i18n: tdebase
$(call buildpkg,applications/gwenview-i18n) $(call buildpkg,applications/gwenview-i18n)
@ -588,6 +614,6 @@ koffice-i18n: tdebase
tde-i18n: tdebase tde-i18n: tdebase
$(call buildpkg,tde-i18n) $(call buildpkg,tde-i18n)
# Meta packages ### Meta packages
meta: meta:
$(call buildpkg,extras/trinity-desktop) $(call buildpkg,extras/trinity-desktop)

@ -1,15 +1,16 @@
SHELL := /bin/bash SHELL := /bin/bash
PATH := $(PATH):$(shell pwd) PATH := $(PATH)/build:$(shell pwd)
TDE_VERSION = 3.5.13.2
buildpkg = \ buildpkg = \
@echo "Now processing '$(1)' ."; \ @echo "Now processing '$(1)' ."; \
if ! is_latest_package_installed.sh "$(1)" 3.5.13.2; then \ if ! is_latest_package_installed.sh "$(1)" ${TDE_VERSION}; then \
echo " Package '${1}' is not yet installed."; \ echo " Package '${1}' is not yet installed."; \
if ! is_latest_package_built.sh "$(1)" 3.5.13.2; then \ if ! is_latest_package_built.sh "$(1)" ${TDE_VERSION}; then \
echo " Building package."; \ echo " Building package."; \
build_rpm_package.sh "$(1)" 3.5.13.2 || exit 1; \ build_rpm_package.sh "$(1)" ${TDE_VERSION} || exit 1; \
echo " Updating repository."; \ echo " Updating repository."; \
update_repository.sh; \ update_repository.sh ${TDE_VERSION}; \
fi; \ fi; \
echo "Now installing package '$(1)'"; \ echo "Now installing package '$(1)'"; \
install_rpm_package.sh "$(1)" || exit 2; \ install_rpm_package.sh "$(1)" || exit 2; \
@ -21,12 +22,12 @@ 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 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 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 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 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 kpowersave 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 i18n: gwenview-i18n k3b-i18n koffice-i18n tde-i18n
### Trinity Dependencies ### Trinity Dependencies
arts: tqtinterface arts: tqtinterface esound
$(call buildpkg,dependencies/arts) $(call buildpkg,dependencies/arts)
avahi-tqt: tqtinterface avahi-tqt: tqtinterface
@ -69,7 +70,7 @@ tdeadmin: tdebase
tdeartwork: tdebase tdeartwork: tdebase
$(call buildpkg,tdeartwork) $(call buildpkg,tdeartwork)
tdebase: tdelibs tdebase: tdelibs htdig hal
$(call buildpkg,tdebase) $(call buildpkg,tdebase)
tdebindings: tdebase tdebindings: tdebase
@ -112,6 +113,12 @@ tdewebdev: tdebase tdesdk
$(call buildpkg,tdewebdev) $(call buildpkg,tdewebdev)
### 3rd party libraries and tools ### 3rd party libraries and tools
esound:
# Build on Mageia only
ifneq ($(wildcard /etc/mageia-release),)
$(call buildpkg,3rdparty/esound)
endif
gnuchess: gnuchess:
# Build on CentOS 5 only # Build on CentOS 5 only
ifneq ($(wildcard /boot/vmlinuz*.el5*),) ifneq ($(wildcard /boot/vmlinuz*.el5*),)
@ -120,18 +127,21 @@ endif
hal: hal-info hal: hal-info
# Do NOT build on CentOS # Do NOT build on CentOS
ifneq ($(wildcard /etc/centos-release),) ifeq ($(wildcard /etc/centos-release),)
$(call buildpkg,3rdparty/hal) $(call buildpkg,3rdparty/hal)
endif endif
hal-info: hal-info:
# Do NOT build on CentOS # Do NOT build on CentOS
ifneq ($(wildcard /etc/centos-release),) ifeq ($(wildcard /etc/centos-release),)
$(call buildpkg,3rdparty/hal-info) $(call buildpkg,3rdparty/hal-info)
endif endif
htdig: htdig:
# build on Mageia only
ifneq ($(wildcard /etc/mageia-release),)
$(call buildpkg,3rdparty/htdig) $(call buildpkg,3rdparty/htdig)
endif
imlib1: imlib1:
# Do NOT build on Fedora, nor CentOS # Do NOT build on Fedora, nor CentOS
@ -156,13 +166,13 @@ ifneq ($(wildcard /etc/mageia-release),)
endif endif
lilypond: mftrace lilypond: mftrace
# Build on CentOS >= 6 only # Build on CentOS only
ifneq ($(wildcard /etc/centos-release),) ifneq ($(wildcard /etc/centos-release),)
$(call buildpkg,3rdparty/lilypond) $(call buildpkg,3rdparty/lilypond)
endif endif
mftrace: mftrace:
# Build on CentOS >= only # Build on CentOS only
ifneq ($(wildcard /etc/centos-release),) ifneq ($(wildcard /etc/centos-release),)
$(call buildpkg,3rdparty/mftrace) $(call buildpkg,3rdparty/mftrace)
endif endif
@ -188,9 +198,15 @@ ifneq ($(wildcard /boot/vmlinuz*.el5*),)
$(call buildpkg,3rdparty/sip) $(call buildpkg,3rdparty/sip)
endif endif
sword:
# Build on Fedora >= 20 only, or PCLinuxOS
ifneq ($(wildcard /boot/vmlinuz*.fc20* /etc/pclinuxos-release),)
$(call buildpkg,3rdparty/sword)
endif
wv2: wv2:
# Do NOT build on Mageia (package already exists) # Do NOT build on Mageia or openSUSE or PCLINUXOS
ifeq ($(wildcard /etc/mageia-release),) ifeq ($(wildcard /etc/mageia-release /etc/SuSE-release /etc/pclinuxos-release),)
$(call buildpkg,3rdparty/wv2) $(call buildpkg,3rdparty/wv2)
endif endif
@ -239,7 +255,7 @@ amarok: tdebase
basket: tdebase basket: tdebase
$(call buildpkg,applications/basket) $(call buildpkg,applications/basket)
bibletime: tdebase bibletime: tdebase sword
$(call buildpkg,applications/bibletime) $(call buildpkg,applications/bibletime)
compizconfig-backend-kconfig: tdebase compizconfig-backend-kconfig: tdebase
@ -325,7 +341,9 @@ kerry: tdebase
kgtk-qt3: tdebase kgtk-qt3: tdebase
# Do NOT build on CentOS 5 (GTK2 is too old) # Do NOT build on CentOS 5 (GTK2 is too old)
ifeq ($(wildcard /boot/vmlinuz*.el5*),) # 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*.fc20* /boot/vmlinuz*.mga4*),)
$(call buildpkg,applications/kgtk-qt3) $(call buildpkg,applications/kgtk-qt3)
endif endif
@ -374,7 +392,7 @@ koffice: tdebase wv2
konversation: tdebase konversation: tdebase
$(call buildpkg,applications/konversation) $(call buildpkg,applications/konversation)
kopete-otr: tdebase kopete-otr: tdebase libotr3
$(call buildpkg,applications/kopete-otr) $(call buildpkg,applications/kopete-otr)
kpicosim: tdebase kpicosim: tdebase

@ -28,12 +28,14 @@ fi
[ -d "${BUILDDIR}" ] || mkdir -p "${BUILDDIR}" [ -d "${BUILDDIR}" ] || mkdir -p "${BUILDDIR}"
RPMDIR="$(rpm -E %{_rpmdir}.tde-${TDE_VERSION})"
rpmbuild -ba \ rpmbuild -ba \
--define "_specdir ${TEMPDIR}" \ --define "_specdir ${TEMPDIR}" \
--define "_sourcedir ${TEMPDIR}" \ --define "_sourcedir ${TEMPDIR}" \
--define "_builddir ${BUILDDIR}" \ --define "_builddir ${BUILDDIR}" \
--define "_buildrootdir ${BUILDROOTDIR}" \ --define "_buildrootdir ${BUILDROOTDIR}" \
--define "_rpmdir ${RPMDIR}" \
--define "tde_version ${TDE_VERSION}" \ --define "tde_version ${TDE_VERSION}" \
--define "tde_prefix /opt/trinity" \ --define "tde_prefix /opt/trinity" \
--define "preversion ${PREVERSION}" \ --define "preversion ${PREVERSION}" \

@ -0,0 +1,22 @@
#!/bin/bash
TDE_VERSION=${1:-14.0.0}
ARCH=$(uname -i)
RPMDIR=$(rpm -E %{_rpmdir}.tde-${TDE_VERSION})
if [ -x /usr/bin/yum ]; then
cat <<EOF >/tmp/rpmbuild-tde.repo
[rpmbuild.${ARCH}]
name=rpmbuild.${ARCH}
baseurl=file://${RPMDIR}/${ARCH}
enabled=1
gpgcheck=0
[rpmbuild.noarch]
name=rpmbuild.noarch
baseurl=file://${RPMDIR}/noarch
enabled=1
gpgcheck=0
EOF
sudo mv -f /tmp/rpmbuild-tde.repo /etc/yum.repos.d/
fi

@ -2,13 +2,26 @@
PKGNAME="$1" PKGNAME="$1"
[ -z "${PKGNAME}" ] && echo "You must specify a package name !" && exit 1 [ -z "${PKGNAME}" ] && echo "You must specify a package name !" && exit 1
TDE_VERSION="${2:-14.0.0}"
RPMDIR=$(rpm -E %_rpmdir) RPMDIR="$(rpm -E %{_rpmdir}.tde-${TDE_VERSION})"
if [ $(uname -i) == "x86_64" ]; then
RPMDIR_ARCH=${RPMDIR}/x86_64
else
RPMDIR_ARCH=${RPMDIR}/i?86
fi
RPMDIR_NOARCH=${RPMDIR}/noarch
RPMDIRS="${RPMDIR_ARCH} ${RPMDIR_NOARCH}"
case "${PKGNAME##*/}" in
"koffice") PKGNAME="koffice-suite";;
"tde-i18n") PKGNAME="tde-i18n-French";;
esac
RPM=$(find ${RPMDIR} -name "trinity-${PKGNAME}-[0-9]*.rpm" | sort -n | tail -n 1) RPM=$(find ${RPMDIRS} -name "trinity-${PKGNAME##*/}-[0-9]*.rpm" | sort -n | tail -n 1)
if [ ! -r "${RPM}" ]; then if [ ! -r "${RPM}" ]; then
RPM=$(find ${RPMDIR} -name "${PKGNAME}-[0-9]*.rpm" | sort -n | tail -n 1) RPM=$(find ${RPMDIRS} -name "${PKGNAME##*/}-[0-9]*.rpm" | sort -n | tail -n 1)
if [ ! -r "${RPM}" ]; then if [ ! -r "${RPM}" ]; then
echo "Error, cannot find any package for '${PKGNAME}' !" echo "Error, cannot find any package for '${PKGNAME}' !"
exit 1 exit 1

@ -5,7 +5,7 @@ TDE_VERSION="${2:-14.0.0}"
[ -z "${PKGNAME}" ] && echo "You must specify a package name !" && exit 1 [ -z "${PKGNAME}" ] && echo "You must specify a package name !" && exit 1
RPM=$(get_latest_built_package_filename.sh "${PKGNAME}") RPM=$(get_latest_built_package_filename.sh "${PKGNAME}" ${TDE_VERSION})
[ ! -r "${RPM}" ] && echo "No package found for '${PKGNAME}' !" && exit 2 [ ! -r "${RPM}" ] && echo "No package found for '${PKGNAME}' !" && exit 2

@ -0,0 +1,46 @@
#!/bin/bash
# Gets the RPM package name from the component name.
# This is useful because some RPM packages do not have prefix "trinity"
# while others do.
#
# E.g :
# trinity-qt3 => qt3
# trinity-tdelibs => trinity-tdelibs
PKGCATEGORY="${1%%/*}"
PKGNAME="${1##*/}"
DEVEL="$2"
# Language package: install only French language package
case "${PKGNAME}" in
"k3b-i18n"|"koffice-i18n"|"tde-i18n") PKGNAME="${PKGNAME}-French";;
"koffice") PKGNAME="${PKGNAME}-suite";;
esac
# Use the Trinity Prefix, or not.
case "${PKGNAME}" in
"trinity-"*|"qt3"|"python-qt3"|"esound") PREFIX="";;
"gnuchess"|"htdig"|"imlib1"|"libotr3"|"lilypond"|"mftrace"|"pcsc-perl"|"torsocks"|"wv2") PREFIX="";;
"curl") PREFIX="trinity-lib";;
*) PREFIX="trinity-";;
esac
echo "${PREFIX}${PKGNAME}"
if [ -n "${DEVEL}" ]; then
# Check if development package is required.
# 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
echo "${PREFIX}${PKGNAME}-devel"
fi

@ -6,8 +6,7 @@ while [ -e "${LOCKFILE}" ]; do
sleep 3 sleep 3
done done
PKGCATEGORY="${1%%/*}" PKGNAME="${1}"
PKGNAME="${1##*/}"
if [ -x /usr/sbin/urpmi ]; then if [ -x /usr/sbin/urpmi ]; then
PKGINST='sudo urpmi --auto --no-verify-rpm' PKGINST='sudo urpmi --auto --no-verify-rpm'
@ -19,33 +18,8 @@ elif [ -x /usr/bin/apt-get ]; then
PKGINST='sudo apt-get install -y' PKGINST='sudo apt-get install -y'
fi fi
# Language package: install only French language package # Gets RPM package name and development package (if any)
case "${PKGNAME}" in RPM_PKGNAME="$(get_rpm_package_name.sh ${PKGNAME} devel)"
"k3b-i18n"|"koffice-i18n"|"tde-i18n") PKGNAME="${PKGNAME}-French";;
"koffice") PKGNAME="${PKGNAME}-suite";;
esac
# Use the Trinity Prefix, or not.
case "${PKGNAME}" in
"trinity-"*|"qt3"|"python-qt3"|"esound") PREFIX="";;
"gnuchess"|"imlib1"|"lilypond"|"mftrace"|"pcsc-perl"|"torsocks"|"wv2") PREFIX="";;
"curl") PREFIX="trinity-lib";;
*) PREFIX="trinity-";;
esac
# Installing main package # Installing main package
eval ${PKGINST} "${PREFIX}${PKGNAME}" || exit 1 eval ${PKGINST} ${RPM_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"

@ -6,11 +6,13 @@ TDE_VERSION="${2:-14.0.0}"
BUILT=$(get_latest_built_package_version.sh ${PKGNAME} ${TDE_VERSION}) BUILT=$(get_latest_built_package_version.sh ${PKGNAME} ${TDE_VERSION})
TARBALL=$(get_latest_tarball_version.sh ${PKGNAME} ${TDE_VERSION}) TARBALL=$(get_latest_tarball_version.sh ${PKGNAME} ${TDE_VERSION})
# If package version contains a "~": it's a pre-release
if [ "${BUILT/\~/}" != "${BUILT}" ]; then if [ "${BUILT/\~/}" != "${BUILT}" ]; then
if [ "${BUILT#*\~}" = "${TARBALL#*\~}" ]; then if [ "${BUILT#*\~}" = "${TARBALL#*\~}" ]; then
echo "Latest package '${PKGNAME}' version '${BUILT}' is already built." echo "Latest package '${PKGNAME}' version '${BUILT}' is already built."
exit 0 exit 0
fi fi
# Nominal case: no "~" caracter
else else
if [ "${TARBALL%-*}" = "${BUILT%-*}" ]; then if [ "${TARBALL%-*}" = "${BUILT%-*}" ]; then
echo "Latest package '${PKGNAME}' version '${BUILT}' is already built." echo "Latest package '${PKGNAME}' version '${BUILT}' is already built."

@ -3,7 +3,7 @@
PKGNAME="${1##*/}" PKGNAME="${1##*/}"
TDE_VERSION="${2:-14.0.0}" TDE_VERSION="${2:-14.0.0}"
INSTALLED=$(get_installed_package_version.sh ${PKGNAME}) INSTALLED=$(get_installed_package_version.sh ${PKGNAME} ${TDE_VERSION})
TARBALL=$(get_latest_tarball_version.sh ${PKGNAME} ${TDE_VERSION}) TARBALL=$(get_latest_tarball_version.sh ${PKGNAME} ${TDE_VERSION})
SPEC=$(get_spec_version.sh ${PKGNAME} ${TDE_VERSION}) SPEC=$(get_spec_version.sh ${PKGNAME} ${TDE_VERSION})

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
WORKERS=$(getconf _NPROCESSORS_ONLN) WORKERS=$(getconf _NPROCESSORS_ONLN)
TDE_VERSION="${1:-14.0.0}"
LOCKFILE="/tmp/lock.${0##*/}" LOCKFILE="/tmp/lock.${0##*/}"
while [ -e "${LOCKFILE}" ]; do while [ -e "${LOCKFILE}" ]; do
@ -9,13 +10,13 @@ while [ -e "${LOCKFILE}" ]; do
done done
if [ -x /usr/sbin/urpmi ]; then 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)' REPOUPDATE='(cd $(rpm -E %{_rpmdir}.tde-${TDE_VERSION}); 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 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)' REPOUPDATE='(cd $(rpm -E %{_rpmdir}.tde-${TDE_VERSION}); createrepo --workers=${WORKERS} $(uname -i); createrepo --workers=${WORKERS} noarch; sudo zypper refresh rpmbuild.$(uname -i) rpmbuild.noarch)'
elif [ -x /usr/bin/yum ]; then elif [ -x /usr/bin/yum ]; then
REPOUPDATE='(cd $(rpm -E %{_rpmdir}); createrepo $(uname -i); createrepo noarch; sudo yum clean all --disablerepo="*" --enablerepo="rpmbuild*")' REPOUPDATE='(cd $(rpm -E %{_rpmdir}.tde-${TDE_VERSION}); createrepo $(uname -i); createrepo noarch; sudo yum clean all --disablerepo="*" --enablerepo="rpmbuild*")'
elif [ -x /usr/bin/apt-get ]; then 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)' REPOUPDATE='(cd $(rpm -E %{_rpmdir}.tde-${TDE_VERSION}); genpkglist $PWD noarch; genpkglist $PWD i586; genpkglist $PWD x86_64; genbasedir $PWD i586 x86_64 noarch; sudo apt-get update)'
fi fi
eval "${REPOUPDATE}; rm -f ${LOCKFILE}"|| exit 1 eval "${REPOUPDATE}; rm -f ${LOCKFILE}"|| exit 1

@ -73,6 +73,7 @@ alias crz='(cdrpm; createrepo $(uname -i); createrepo noarch; sudo zypper refres
# Build local repository (PCLOS) # Build local repository (PCLOS)
alias cra='(cdrpm; genpkglist $PWD noarch; genpkglist $PWD i586; genpkglist $PWD x86_64; genbasedir $PWD i586 x86_64 noarch; sudo apt-get update)' alias cra='(cdrpm; genpkglist $PWD noarch; genpkglist $PWD i586; genpkglist $PWD x86_64; genbasedir $PWD i586 x86_64 noarch; sudo apt-get update)'
alias crac='(cdrpm; for i in i586 noarch x86_64; do cd $i; tdesortrpm.sh; cd -; done; rpmsign --addsign */RPMS.*/*.rpm; for i in i586 noarch x86_64; do for j in 3rdparty applications dependencies extras libraries main; do genpkglist $PWD/$i $j; done; done; for i in i586 noarch x86_64; do genbasedir $PWD/$i 3rdparty applications dependencies extras libraries main; done; sudo apt-get update)' alias crac='(cdrpm; for i in i586 noarch x86_64; do cd $i; tdesortrpm.sh; cd -; done; rpmsign --addsign */RPMS.*/*.rpm; for i in i586 noarch x86_64; do for j in 3rdparty applications dependencies extras libraries main; do genpkglist $PWD/$i $j; done; done; for i in i586 noarch x86_64; do genbasedir $PWD/$i 3rdparty applications dependencies extras libraries main; done; sudo apt-get update)'
alias cras='(cdrpm; cd $(uname -i); rm -rf base; mkdir base; for i in 3rdparty applications dependencies extras libraries main; do genpkglist $PWD $i; done; genbasedir $PWD 3rdparty applications dependencies extras libraries main; cd ../noarch; rm -rf base; mkdir base; for i in applications dependencies extras main; do genpkglist $PWD $i; done; genbasedir $PWD applications dependencies extras main )'
# Reinstall packages (Mageia) # Reinstall packages (Mageia)
getrpmfromsrpm() { getrpmfromsrpm() {

@ -0,0 +1,63 @@
#!/bin/bash
LIB="$1"
LIBDIR="$(rpm -E %_libdir)"
FILENAME="${LIB}.la"
FILE="${LIBDIR}/${FILENAME}"
if [ -r "${FILE}" ]; then
echo "Already exists !!! Abort"
exit 1
fi
LIBLONG="$(echo ${LIBDIR}/${LIB}.so.*.*)"
LIBSHORT="$(echo ${LIBDIR}/${LIB}.so.?)"
echo "Library: ${LIBLONG} | ${LIBSHORT}"
cat <<EOF >/tmp/$LIB.$$
# ${FILENAME} - a libtool library file
# Generated by libtool (GNU libtool) 2.4.2
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname='${LIBSHORT}'
# Names of this library.
library_names='${LIBLONG} ${LIBSHORT} ${LIB}.so'
# The name of the static archive.
old_library='${LIB}.a'
# Linker flags that can not go in dependency_libs.
inherited_linker_flags=''
# Libraries that this one depends upon.
dependency_libs=' -lm'
# Names of additional weak libraries provided by this library
weak_library_names=''
# Version information for ${LIB}.
current=4
age=2
revision=0
# Is this an already installed library?
installed=yes
# Should we warn about portability when linking against -modules?
shouldnotlink=no
# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='${LIBDIR}'
EOF
sudo mv "/tmp/$LIB.$$" "${FILE}"

@ -25,6 +25,8 @@ MGA3: 9.2
MAGEIA 4: MAGEIA 4:
Bug in /usr/lib[64]/pkgconfig/ruby.pc : missing "ruby_version:" value Bug in /usr/lib[64]/pkgconfig/ruby.pc : missing "ruby_version:" value
Should be: ruby_version=2.0.0
CENTOS 4 / CENTOS 5 CENTOS 4 / CENTOS 5

@ -197,3 +197,6 @@ xscreensaver
xscreensaver-extras xscreensaver-extras
xulrunner-devel xulrunner-devel
xz-devel xz-devel
texinfo
fontpackages-devel
texlive-utils

@ -322,3 +322,5 @@ sword-devel
drakconf drakconf
imlib1-devel imlib1-devel
NetworkManager-glib-devel NetworkManager-glib-devel
lib64xaw-devel
libxv-devel

Loading…
Cancel
Save