diff options
author | François Andriot <albator78@libertysurf.fr> | 2013-07-25 18:19:54 +0200 |
---|---|---|
committer | François Andriot <albator78@libertysurf.fr> | 2013-07-25 18:19:54 +0200 |
commit | f75675f1198669c809cbe7acaea85e05f8018b45 (patch) | |
tree | fd38f9fab9ca4f64cb1b83d7581ed348ef55844c /redhat/rpmdist.sh | |
parent | a497078288eafb32f620c04fd4f28b8cefcfc87b (diff) | |
download | tde-packaging-f75675f1198669c809cbe7acaea85e05f8018b45.tar.gz tde-packaging-f75675f1198669c809cbe7acaea85e05f8018b45.zip |
RPM Packaging: add build scripts
Diffstat (limited to 'redhat/rpmdist.sh')
-rwxr-xr-x | redhat/rpmdist.sh | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/redhat/rpmdist.sh b/redhat/rpmdist.sh new file mode 100755 index 000000000..047fbfaa6 --- /dev/null +++ b/redhat/rpmdist.sh @@ -0,0 +1,52 @@ +#!/bin/bash + +FEDORA=0 +RHEL=0 +MGA=0 +DIST="" + +if [ -r /etc/redhat-release ]; then + read a b c d e < /etc/redhat-release +elif [ -r /etc/SuSE-release ]; then + a="opensuse" +fi + +case $a in + # Mageia release 1 (Official) for x86_64 + Mageia*) + DIST=".mga${c}" +# MDKVERSION="201002" + ;; + # Mandriva Linux release 2011.0 (Official) for x86_64 + Mandriva*) + DIST=".mdv${d}" + MDKVERSION="201100" + ;; + # CentOS release 5.7 (Final) + # CentOS Linux release 6.0 (Final) + CentOS*) + if [ $c = "release" ]; then + RHEL="${d%%.*}"; DIST=".el${RHEL}" + else + RHEL="${c%%.*}"; DIST=".el${RHEL}" + fi + ;; + # Fedora release 15 (Lovelock) + Fedora*) FEDORA="${c}"; DIST=".fc${FEDORA}";; + # Opensuse + opensuse) + DIST=".oss$((read l; read a b c; echo ${c//./}) </etc/SuSE-release)" + ;; + # PCLinuxOS + PCLinuxOS) PCLINUXOS="${c}"; DIST=".pclos${c}";; + + *) echo "distrib non reconnue !! $a";; +esac + +case "$1" in + "--dist") echo $DIST;; + "--rhel") echo $RHEL;; + "--fedora") echo $FEDORA;; + "--mdkversion") echo $MDKVERSION;; + "--pclinuxos") echo $PCLINUXOS;; +esac |