diff --git a/redhat/kdevelop/c_cpp_reference-2.0.2-config.patch b/redhat/kdevelop/c_cpp_reference-2.0.2-config.patch
new file mode 100644
index 000000000..3d534df91
--- /dev/null
+++ b/redhat/kdevelop/c_cpp_reference-2.0.2-config.patch
@@ -0,0 +1,11 @@
+--- c_cpp_reference-2.0.2_for_KDE_3.0/configure.orig Mon Dec 9 18:35:50 2002
++++ c_cpp_reference-2.0.2_for_KDE_3.0/configure Mon Dec 9 18:41:16 2002
+@@ -5868,7 +5868,7 @@
+ So, check this please and use another prefix!" 1>&2; exit 1; }
+ fi
+
+-kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib /usr/X11R6/lib /usr/local/lib /opt/kde2/lib /opt/kde/lib /usr/X11R6/kde/lib"
++kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib64 /usr/lib /usr/X11R6/lib /usr/local/lib /opt/kde2/lib /opt/kde/lib /usr/X11R6/kde/lib"
+ test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib $KDEDIR $kde_libdirs"
+ kde_libdirs="$ac_kde_libraries $kde_libdirs"
+
diff --git a/redhat/kdevelop/c_cpp_reference-2.0.2_for_KDE_3.0.tar.bz2 b/redhat/kdevelop/c_cpp_reference-2.0.2_for_KDE_3.0.tar.bz2
new file mode 100644
index 000000000..0c8e95118
Binary files /dev/null and b/redhat/kdevelop/c_cpp_reference-2.0.2_for_KDE_3.0.tar.bz2 differ
diff --git a/redhat/kdevelop/kdevelop-2.1.5_for_KDE_3.1-doc.patch b/redhat/kdevelop/kdevelop-2.1.5_for_KDE_3.1-doc.patch
new file mode 100644
index 000000000..c977cb75f
--- /dev/null
+++ b/redhat/kdevelop/kdevelop-2.1.5_for_KDE_3.1-doc.patch
@@ -0,0 +1,19 @@
+--- kdevelop-2.1.5_for_KDE_3.1/configure.doc 2003-10-21 15:08:22.000000000 +0200
++++ kdevelop-2.1.5_for_KDE_3.1/configure 2003-10-21 15:14:18.000000000 +0200
+@@ -23794,14 +23794,14 @@
+
+ kdelibs_docdirs="/usr/doc/kdelibs-doc/html"
+ if test "$ac_kde_htmldir" != ""; then
+- kdelibs_docdirs="$kdelibs_docdirs $ac_kde_htmldir/default/kdelibs $ac_kde_htmldir/en/kdelibs"
++ kdelibs_docdirs="$kdelibs_docdirs $ac_kde_htmldir/default/kdelibs $ac_kde_htmldir/en/kdelibs $ac_kde_htmldir/en/kdelibs-apidocs"
+ fi
+ kdelibs_docdirs="$ac_kdelibs_docdirs $kdelibs_docdirs"
+
+ kdelibs_docdir=NO
+ for i in $kdelibs_docdirs;
+ do
+- for j in kdecore/index.html;
++ for j in index.html;
+ do
+ echo "configure: 23806: $i/$j" >&5
+ if test -r "$i/$j"; then
diff --git a/redhat/kdevelop/kdevelop-3.5.2-kde4template.patch b/redhat/kdevelop/kdevelop-3.5.2-kde4template.patch
new file mode 100644
index 000000000..58f668925
--- /dev/null
+++ b/redhat/kdevelop/kdevelop-3.5.2-kde4template.patch
@@ -0,0 +1,144 @@
+diff -ur kdevelop-3.5.2/languages/cpp/app_templates/kde4app/kde4app.kdevelop kdevelop-3.5.2-kde4template/languages/cpp/app_templates/kde4app/kde4app.kdevelop
+--- kdevelop-3.5.2/languages/cpp/app_templates/kde4app/kde4app.kdevelop 2007-09-26 11:42:09.000000000 +0200
++++ kdevelop-3.5.2-kde4template/languages/cpp/app_templates/kde4app/kde4app.kdevelop 2008-06-07 01:10:11.000000000 +0200
+@@ -113,18 +113,11 @@
+
+
+
+- %{dest}/build/%{APPNAMELC}
++ %{dest}/%{APPNAMELC}
+
+ false
+- false
+-
+-
+-
+-
+-
+-
+-
+-
++ true
++
+ false
+ false
+
+@@ -134,7 +127,7 @@
+
+
+ make
+- %{dest}/build
++ %{dest}
+
+
+ false
+@@ -146,14 +139,7 @@
+
+ default
+
+-
+-
+-
+-
+-
+-
+-
+-
++
+
+
+
+@@ -179,7 +165,10 @@
+
+
+
+- build
++ CMakeFiles
++ CMakeTmp
++ cmake_install.cmake
++ cmake_uninstall.cmake
+
+
+
+@@ -189,7 +178,6 @@
+ 4
+ ExternalDesigner
+ /usr/bin/designer-qt4
+- /usr/lib/qt4
+
+
+
+diff -ur kdevelop-3.5.2/languages/cpp/app_templates/kde4app/kde4app.kdevtemplate kdevelop-3.5.2-kde4template/languages/cpp/app_templates/kde4app/kde4app.kdevtemplate
+--- kdevelop-3.5.2/languages/cpp/app_templates/kde4app/kde4app.kdevtemplate 2008-02-11 12:22:37.000000000 +0100
++++ kdevelop-3.5.2-kde4template/languages/cpp/app_templates/kde4app/kde4app.kdevtemplate 2008-06-07 01:08:10.000000000 +0200
+@@ -43,7 +43,7 @@
+ Comment[sv]=Skapar ett enkelt KDE 4-program med ett toppnivåfönster, menyer och verktygsrader.
+ Comment[zh_TW]=產生一個簡單的 KDE4 應用程式,內含頂層視窗、選單與工具列。
+ FileTemplates=h,CStyle,cpp,CStyle
+-ShowFilesAfterGeneration=%{dest}/README
++ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.cpp
+ Archive=kde4app.tar.gz
+
+ [FILE1]
+@@ -112,24 +112,22 @@
+ Source=%{src}/settings.kcfgc
+ Dest=%{dest}/settings.kcfgc
+
+-[FILE13]
+-Type=install
+-Source=%{src}/README
+-Dest=%{dest}/README
+
+-[FILE14]
++[FILE13]
+ Type=install
+ Source=%{src}/kde4app.kdevelop
+ Dest=%{dest}/%{APPNAMELC}.kdevelop
+
+-[FILE15]
++[FILE14]
+ Type=install
+ Source=%{src}/kde4app.kdevelop.filelist
+ Dest=%{dest}/%{APPNAMELC}.kdevelop.filelist
+
+-[MKDIR1]
+-Type=mkdir
+-Dir=%{dest}/build
++[CMAKE]
++Type=finishcmd
++Command=cmake ./ -GKDevelop3
++Directory=%{dest}
++
+
+ [MSG]
+ Type=message
+diff -ur kdevelop-3.5.2/languages/cpp/app_templates/kde4app/Makefile.am kdevelop-3.5.2-kde4template/languages/cpp/app_templates/kde4app/Makefile.am
+--- kdevelop-3.5.2/languages/cpp/app_templates/kde4app/Makefile.am 2007-09-26 11:42:09.000000000 +0200
++++ kdevelop-3.5.2-kde4template/languages/cpp/app_templates/kde4app/Makefile.am 2008-06-07 00:37:23.000000000 +0200
+@@ -1,6 +1,6 @@
+ dataFiles = kapp4.cpp kapp4.h prefs_base.ui kapp4view.cpp kapp4view.h kapp4view_base.ui \
+ main.cpp kde4appui.rc CMakeLists.txt kapp4.desktop kapp4.kcfg settings.kcfgc \
+- kde4app.png README kde4app.kdevelop kde4app.kdevelop.filelist
++ kde4app.png kde4app.kdevelop kde4app.kdevelop.filelist
+
+ templateName = kde4app
+
+diff -ur kdevelop-3.5.2/languages/cpp/app_templates/kde4app/Makefile.in kdevelop-3.5.2-kde4template/languages/cpp/app_templates/kde4app/Makefile.in
+--- kdevelop-3.5.2/languages/cpp/app_templates/kde4app/Makefile.in 2008-05-13 16:23:40.000000000 +0200
++++ kdevelop-3.5.2-kde4template/languages/cpp/app_templates/kde4app/Makefile.in 2008-06-07 00:37:30.000000000 +0200
+@@ -373,7 +373,7 @@
+ xdg_menudir = @xdg_menudir@
+ dataFiles = kapp4.cpp kapp4.h prefs_base.ui kapp4view.cpp kapp4view.h kapp4view_base.ui \
+ main.cpp kde4appui.rc CMakeLists.txt kapp4.desktop kapp4.kcfg settings.kcfgc \
+- kde4app.png README kde4app.kdevelop kde4app.kdevelop.filelist
++ kde4app.png kde4app.kdevelop kde4app.kdevelop.filelist
+
+ templateName = kde4app
+
+diff -ur kdevelop-3.5.2/languages/cpp/app_templates/kdecpp.appwizard kdevelop-3.5.2-kde4template/languages/cpp/app_templates/kdecpp.appwizard
+--- kdevelop-3.5.2/languages/cpp/app_templates/kdecpp.appwizard 2007-04-10 01:44:25.000000000 +0200
++++ kdevelop-3.5.2-kde4template/languages/cpp/app_templates/kdecpp.appwizard 2008-06-06 23:52:16.000000000 +0200
+@@ -1,2 +1,2 @@
+ [General]
+-List=kdedcop,kioslave,kxt,kdevlang,kmake,kapp,kconfig35,kdevlang,kdevpart,kateplugin,kdevpart2,kopart,noatunui,kateplugin2,kfileplugin,konqnavpanel,noatunvisual,dcopservice,khello,kpartapp,khello2,kpartplugin,kcmodule,kicker,kscreensaver,kscons_kxt,kscons_kmdi
++List=kde4app,kdedcop,kioslave,kxt,kdevlang,kmake,kapp,kconfig35,kdevlang,kdevpart,kateplugin,kdevpart2,kopart,noatunui,kateplugin2,kfileplugin,konqnavpanel,noatunvisual,dcopservice,khello,kpartapp,khello2,kpartplugin,kcmodule,kicker,kscreensaver,kscons_kxt,kscons_kmdi
diff --git a/redhat/kdevelop/trinity-kdevelop-3.5.12.spec b/redhat/kdevelop/trinity-kdevelop-3.5.12.spec
new file mode 100644
index 000000000..d7ca3a9fe
--- /dev/null
+++ b/redhat/kdevelop/trinity-kdevelop-3.5.12.spec
@@ -0,0 +1,237 @@
+# Default version for this component
+%if "%{?version}" == ""
+%define version 3.5.12
+%endif
+%define release 1
+
+# If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt".
+%if "%{?_prefix}" != "/usr"
+%define _variant .opt
+%define _docdir %{_prefix}/share/doc
+%endif
+
+# TDE 3.5.12 specific building variables
+BuildRequires: autoconf automake libtool m4
+%define tde_docdir %{_docdir}
+%define tde_includedir %{_includedir}/kde
+%define tde_libdir %{_libdir}/kde3
+
+%define _default_patch_fuzz 2
+%define qt_version 3.3.8b
+%define qt_ver %{qt_version}
+
+Name: trinity-kdevelop
+Summary: Integrated Development Environment for C++/C
+Version: %{?version}
+Release: %{?release}%{?dist}%{?_variant}
+
+
+License: GPLv2
+Group: Development/Tools
+
+Vendor: Trinity Project
+Packager: Francois Andriot
+URL: http://www.trinitydesktop.org/
+
+Prefix: %{_prefix}
+
+Source: kdevelop-%{version}.tar.gz
+Source1: ftp://129.187.206.68/pub/unix/ide/KDevelop/c_cpp_reference-2.0.2_for_KDE_3.0.tar.bz2
+
+# RedHat Legacy patches
+Patch1: c_cpp_reference-2.0.2-config.patch
+#Patch2: kdevelop-2.1.5_for_KDE_3.1-doc.patch
+# improved integration for the KDE 4 template - no special KDE 4 build environment needed in Fedora
+Patch4: kdevelop-3.5.2-kde4template.patch
+
+#upstream patches
+
+Provides: kdevelop3 = %{version}-%{release}
+
+Requires: %{name}-libs = %{version}-%{release}
+
+
+Requires: trinity-kdelibs-devel
+Requires: make
+Requires: perl
+Requires: flex >= 2.5.4
+Requires: qt3-designer
+Requires: gettext
+Requires: ctags
+
+BuildRequires: trinity-kdelibs-devel
+BuildRequires: trinity-kdelibs-apidocs
+BuildRequires: qt3-devel-docs
+BuildRequires: db4-devel
+BuildRequires: flex
+# FIXME: No CVS support in KDevelop? This is going to suck...
+# Requires kdesdk3.
+BuildRequires: trinity-kdesdk-devel
+BuildRequires: subversion-devel neon-devel
+# looks like this is dragged in by apr-devel (dep of subversion-devel), but not
+# a dependency
+BuildRequires: openldap-devel
+
+%description
+The KDevelop Integrated Development Environment provides many features
+that developers need as well as providing a unified interface to programs
+like gdb, the C/C++ compiler, and make. KDevelop manages or provides:
+
+All development tools needed for C++ programming like Compiler,
+Linker, automake and autoconf; KAppWizard, which generates complete,
+ready-to-go sample applications; Classgenerator, for creating new
+classes and integrating them into the current project; File management
+for sources, headers, documentation etc. to be included in the
+project; The creation of User-Handbooks written with SGML and the
+automatic generation of HTML-output with the KDE look and feel;
+Automatic HTML-based API-documentation for your project's classes with
+cross-references to the used libraries; Internationalization support
+for your application, allowing translators to easily add their target
+language to a project;
+
+KDevelop also includes WYSIWYG (What you see is what you get)-creation
+of user interfaces with a built-in dialog editor; Debugging your
+application by integrating KDbg; Editing of project-specific pixmaps
+with KIconEdit; The inclusion of any other program you need for
+development by adding it to the "Tools"-menu according to your
+individual needs.
+
+%package devel
+Summary: Development files for %{name}
+Group: Development/Libraries
+Provides: kdevelop3-devel = %{version}-%{release}
+Requires: %{name}-libs = %{version}-%{release}
+Requires: trinity-kdelibs-devel
+%description devel
+%{summary}.
+
+%package libs
+Summary: %{name} runtime libraries
+Group: System Environment/Libraries
+Requires: trinity-kdelibs
+# helps multilib upgrades
+Obsoletes: %{name} < %{version}-%{release}
+# include to be paranoid, installing libs-only is still mostly untested -- Rex
+Requires: %{name} = %{version}-%{release}
+%description libs
+%{summary}.
+
+
+
+%prep
+%setup -q -n kdevelop -a1
+%patch1 -p0 -b .config
+#patch2 -p1 -b .doc
+#patch4 -p1 -b .kde4template
+
+%__rm -rf c_cpp_reference-2.0.2_for_KDE_3.0/admin
+%__cp -a admin c_cpp_reference-2.0.2_for_KDE_3.0/
+%__make -C c_cpp_reference-2.0.2_for_KDE_3.0 -f admin/Makefile.common cvs
+
+%__cp "/usr/share/aclocal/libtool.m4" "admin/libtool.m4.in"
+%__cp "/usr/share/libtool/config/ltmain.sh" "admin/ltmain.sh"
+%__make -f "admin/Makefile.common"
+
+
+%build
+QTDIR="" && source /etc/profile.d/qt.sh
+export PATH="%{_bindir}:${PATH}"
+export LDFLAGS="-L%{_libdir} -I%{_includedir}"
+
+# Fix KDE detection fail in "./configure" because tqt.h cannot be found
+export CXXFLAGS="${CXXFLAGS} -I%{_includedir}/tqt"
+
+# c references
+pushd c_cpp_reference-2.0.2_for_KDE_3.0
+%configure \
+ --with-qt-libraries=$QTDIR/lib \
+ --with-qt-includes=$QTDIR/include \
+ --with-extra-libs=%{_libdir} \
+ --with-extra-includes=%{_includedir}/tqt
+popd
+
+%configure \
+ --enable-new-ldflags \
+ --disable-dependency-tracking \
+ --disable-rpath \
+ --disable-debug \
+ --disable-warnings \
+ --enable-final \
+ --with-qtdoc-dir=%{_docdir}/qt-devel-%{qt_ver}/html/ \
+ --with-kdelibsdoc-dir=%{tde_docdir}/HTML/en/kdelibs-apidocs/ \
+ --with-extra-libs=%{_libdir} \
+ --with-extra-includes=%{_includedir}/tqt
+
+
+# parallel make disabled because otherwise main.cpp can get built before
+# profileeditorbase.h is fully generated
+%__make
+%__make %{?_smp_mflags} -C c_cpp_reference-2.0.2_for_KDE_3.0
+
+
+%install
+%__rm -rf %{buildroot}
+
+%make_install
+%make_install -C c_cpp_reference-2.0.2_for_KDE_3.0
+
+# remove useless files
+%__rm -rf %{buildroot}%{_prefix}/kdevbdb
+
+
+%post
+for f in hicolor locolor ; do
+ touch --no-create %{_datadir}/icons/$f 2> /dev/null ||:
+ gtk-update-icon-cache -q %{_datadir}/icons/$f 2> /dev/null ||:
+done
+update-desktop-database %{_datadir}/applications > /dev/null 2>&1 || :
+
+%postun
+for f in hicolor locolor ; do
+ touch --no-create %{_datadir}/icons/$f 2> /dev/null ||:
+ gtk-update-icon-cache -q %{_datadir}/icons/$f 2> /dev/null ||:
+done
+update-desktop-database %{_datadir}/applications > /dev/null 2>&1 || :
+
+%post libs -p /sbin/ldconfig
+
+%postun libs -p /sbin/ldconfig
+
+
+%clean
+%__rm -rf %{buildroot}
+
+
+%files
+%defattr(-,root,root,-)
+%{tde_docdir}/HTML/en/*
+%{_bindir}/*
+%{tde_libdir}/*
+%{_libdir}/kconf_update_bin/*
+%{_datadir}/applications/kde/*
+%{_datadir}/apps/*
+%{_datadir}/config/*
+%{_datadir}/desktop-directories/*
+%{_datadir}/icons/hicolor/*/*/*
+%{_datadir}/icons/locolor/*/*/*
+%{_datadir}/mimelnk/application/*
+%{_datadir}/mimelnk/text/*
+%{_datadir}/services/*
+%{_datadir}/servicetypes/*
+
+%files libs
+%defattr(-,root,root,-)
+%{_libdir}/lib*.so.*
+%{_libdir}/lib*.la
+
+%files devel
+%defattr(-,root,root,-)
+%{_libdir}/lib*.so
+%{_includedir}/*
+
+
+%changelog
+* Sun Sep 11 2011 Francois Andriot - 3.5.12-1
+- Initial build for RHEL 6
+- Spec file based on Fedora 8 "kdeedu-3.5.3-1"
+- Import to GIT