]> wagnertech.de Git - projects.git/commitdiff
eclipse-cpp added master v_0.0-14
authorMichael Wagner <michael@wagnertech.de>
Sat, 6 Dec 2025 15:11:40 +0000 (16:11 +0100)
committerMichael Wagner <michael@wagnertech.de>
Sat, 6 Dec 2025 15:11:40 +0000 (16:11 +0100)
Configure
debian/eclipse-cpp.control [new file with mode: 0644]
debian/eclipse-cpp.cp [new file with mode: 0755]
debian/eclipse-cpp.postinst [new file with mode: 0755]
debian/eclipse-cpp.prepare [new file with mode: 0755]

index 325f710c5eb07951b0c95e674d6739b82298cb3c..9eddd7dbca49dc7f24f61334f6cc597976300344 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -8,38 +8,50 @@ PROJECT = libcob-ocesql mconnect webssh
 USAGE
 }
 
-if [ -z "$1" ]
-then
+function write_deb {
+       # $1: package name
+       # $2: compile_typ
+       cat <<ANY_DEB >debian/$1.conf
+# generated by configure
+compile_type=$2
+target_type=DEB
+ANY_DEB
+}
+
+function write_changelog {
+       # $1: package name
+       cat <<CHANGELOG >debian/$1.changelog
+projects (%VERSION%-%BUILD%) unstable; urgency=medium
+  * generated by configure
+ -- Michael Wagner <info@wagnertech.de>  Fri, 05 Dec 2025 20:03:04 +0100
+CHANGELOG
+}
+
+if [ -z "$1" ]; then
        usage
        exit 7
 fi
 
 case $1 in
 
-mconnect)
-       cat <<MCONNECT >debian/mconnect.conf
-# generated by configure
-compile_type=NONE
-target_type=DEB
-MCONNECT
-       mconfigure mconnect
+eclipse-cpp)
+       write_deb eclipse-cpp NONE
+       write_changelog eclipse-cpp
+       mconfigure -V eclipse-cpp
        ;;
-
+       
 libcob-ocesql)
-       cat <<OCESQL >debian/libcob-ocesql.conf
-# generated by configure
-compile_type=ANY
-target_type=DEB
-OCESQL
+       write_deb libcob-ocesql ANY
        mconfigure -v 1.4 libcob-ocesql
        ;;
 
+mconnect)
+       write_deb mconnect ANY
+       mconfigure mconnect
+       ;;
+
 webssh)
-       cat <<WEBSSH >debian/webssh.conf
-# generated by configure
-compile_type=ANY
-target_type=DEB
-WEBSSH
+       write_deb webssh ANY
        mconfigure -V webssh
        ;;
 
@@ -49,3 +61,4 @@ WEBSSH
        exit 25
        ;;
 esac
+
diff --git a/debian/eclipse-cpp.control b/debian/eclipse-cpp.control
new file mode 100644 (file)
index 0000000..7fa2a84
--- /dev/null
@@ -0,0 +1,11 @@
+Source: projects
+Section: main
+Priority: optional
+Maintainer: Michael Wagner <michael@wagnertech.de>
+Build-Depends: git, mbuild
+Package: eclipse-cpp
+Architecture: _DEB_HOST_ARCH
+Depends: build-essential, gdb
+Description: http://eclipse.org
+
diff --git a/debian/eclipse-cpp.cp b/debian/eclipse-cpp.cp
new file mode 100755 (executable)
index 0000000..f1c5305
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+set -e
+
+mkdir -p $1/opt/eclipse-cpp/
+cp -a Downloads/eclipse/* $1/opt/eclipse-cpp/
+
diff --git a/debian/eclipse-cpp.postinst b/debian/eclipse-cpp.postinst
new file mode 100755 (executable)
index 0000000..83b1889
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash
+set -e
+
+for user in user nutzer kurs; do
+       if [ -d /home/$user ]; then
+               echo "Install eclipse for user $user"
+               pushd /home/$user >/dev/null
+
+                       if [ -d Schreibtisch ]; then
+                               pushd Schreibtisch >/dev/null
+                                       su $user -c "ln -sf /opt/eclipse-cpp/eclipse ."
+                               popd >/dev/null
+                       fi
+
+                       if [ -d Desktop ]; then
+                               pushd Desktop >/dev/null
+                                       su $user -c "ln -sf /opt/eclipse-cpp/eclipse ."
+                               popd >/dev/null
+                       fi
+               popd >/dev/null
+       fi
+done
+               
diff --git a/debian/eclipse-cpp.prepare b/debian/eclipse-cpp.prepare
new file mode 100755 (executable)
index 0000000..169b64f
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/bash
+set -e
+
+ECPP_PATTERN="eclipse-cpp*.tar.gz"
+
+# check, if there is exactly 1 eclipse-cpp*.tar.gz in Downloads
+pushd Downloads >/dev/null
+       if [ $(ls $ECPP_PATTERN| wc -l) -ne 1 ]; then
+               echo "Es muss genau ein $ECPP_PATTERN in Downloads sein."
+               exit 8
+       fi
+       eclipse_cpp_tgz=$(ls $ECPP_PATTERN)
+       
+       # entpacke tar.gz
+       if [ -d eclipse ]; then
+               rm -r eclipse
+       fi
+       tar xf $eclipse_cpp_tgz
+popd >/dev/null
+
+# bestimme eclipse version
+eversion=${eclipse_cpp_tgz#eclipse-cpp-}
+eversion=${eversion%-linux*}
+echo "version=$eversion" >> debian/rules.pre
+echo "export version=$eversion" >> debian/setenv.sh
+
+# bestimme arch
+arch=${eclipse_cpp_tgz#*gtk-}
+arch=${arch%.tar.gz}
+echo "arch=$arch" >> debian/rules.pre
+echo "export arch=$arch" >> debian/setenv.sh
+
+