Name: kdevelop
Summary: Integrated Development Environment for C++/C
Summary(ja): C++/C 向け統合開発環境
Version: 4.0.0
Release: 1%{?_dist_release}

License: GPLv2
URL: http://www.kdevelop.org/
Group: Applications/Development
Source0: ftp://ftp.kde.org/pub/kde/stable/kdevelop/%{version}/src/%{name}-%{version}.tar.bz2
Source1: ftp://ftp.kde.org/pub/kde/stable/kdevelop/%{version}/src/%{name}-%{version}.tar.bz2.md5sum

#Source1: kdevelop
#Source2: kdevelop-htdig.conf

# fixing https://bugs.kde.org/show_bug.cgi?id=236315
Patch100: kdevelop-4.0.0-qmake_qt4.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: desktop-file-utils
BuildRequires: gettext
BuildRequires: kdebase-workspace-devel
BuildRequires: kdevplatform-devel >= 1.0.0
BuildRequires: kdelibs4-devel 
BuildRequires: valgrind

Requires: %{name}-libs = %{version}-%{release}
Requires: kdevplatform >= 1.0.0

%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 libs
Summary: %{name} runtime libraries
Group:   System Environment/Libraries
#Requires: %{name} = %{version}-%{release}
Requires: kdelibs4

%description libs
%{summary}.


%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name}-libs = %{version}-%{release}

%description devel
%{summary}.


%prep
%setup -q
%patch100 -p1 -b .qmake_qt4

%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
unset QTDIR || : ; . /etc/profile.d/qt4.sh
%cmake \
    -DCMAKE_BUILD_TYPE=release \
    -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
    -DDATA_INSTALL_DIR:PATH=%{_datadir}/kde4/apps \
    -DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/kde4 \
    -DLIB_INSTALL_DIR:PATH=%{_libdir} \
    -DLIBEXEC_INSTALL_DIR:PATH=%{_libexecdir}/kde4 \
    -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \
    ..
popd

make %{?_smp_mflags} -C %{_target_platform}


%install
rm -rf $RPM_BUILD_ROOT

make install/fast DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform}

%find_lang %{name} --all-name --with-kde

%clean
rm -rf $RPM_BUILD_ROOT


%post
touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :

%postun
if [ $1 -eq 0 ] ; then
touch --no-create %{_datadir}/icons/hicolor &> /dev/null
gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
update-desktop-database -q &> /dev/null
update-mime-database %{_datadir}/mime &> /dev/null
fi

%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
update-desktop-database -q &> /dev/null
update-mime-database %{_datadir}/mime &> /dev/null

%post libs -p /sbin/ldconfig

%postun libs -p /sbin/ldconfig

%files -f %{name}.lang
%defattr(-,root,root)
%{_bindir}/*
%config %{_datadir}/config/kdeveloprc
%{_datadir}/applications/kde4/*.desktop
%{_datadir}/kde4/apps/kdev*/
%{_datadir}/kde4/services/*.desktop
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/mime/packages/kdevelop.xml
#{_datadir}/servicetypes/*
#doc %{_datadir}/doc/HTML/en/*

%files libs
%defattr(-,root,root,-)
%{_libdir}/lib*.so
%{_libdir}/kde4/*.so

%files devel
%defattr(-,root,root,-)
%{_datadir}/kde4/apps/cmake/modules/FindKDevelop.cmake
%{_includedir}/kde4/kdevelop/


%changelog
* Sat May  8 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.0.0-1
- new upstream release
- split shared libraries and header files

* Sun May 10 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.5.4-1
- new upstream release
- applied new versioning policy, spec in UTF-8
- changed Group to Applications/Development

* Tue Oct  3 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.3.5-0vl2
- rebuild for VineSeed

* Tue Oct  3 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.3.5-0vl1
- new upstream release

* Wed Aug  2 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.3.4-0vl2
- rebuild for VineSeed

* Wed Aug  2 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.3.4-0vl1
- new upstream release

* Fri Jun  2 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.3.3-0vl2
- rebuild for VineSeed

* Fri Jun  2 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.3.3-0vl1
- new upstream release
- use ap?-config for Vine3.x and use ap?-1-config for VineSeed

* Wed Mar 22 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.3.2-0vl2
- rebuild for VineSeed

* Wed Mar 22 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.3.2-0vl1
- new upstream release

* Mon Feb  6 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.3.1-0vl1
- rebuild for VineSeed

* Mon Feb  6 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.3.1-0vl1
- new upstream release

* Thu Dec  8 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.3.0-0vl2
- rebuild for VineSeed

* Thu Dec  8 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.3.0-0vl1
- new upstream release
- add BuildPrereq: apache2-devel subversion-devel

* Tue Nov 15 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.3.0-0vl0.rc1
- new upstream release

* Tue Oct 18 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.2.92-0vl1
- new upstream release
- delete Patch0

* Thu Sep 22 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.2.91-0vl1
- new upstream release
- add Patch0
- update %%files

* Mon Jul 25 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.2.2-0vl2
- rebuild for VineSeed

* Mon Jul 25 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.2.2-0vl1
- new upstream release

* Tue Jul  5 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.2.1-0vl2
- rebuild for VineSeed

* Tue Jul  5 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.2.1-0vl1
- new upstream release
- add --disable-rpath to configure option
- remove BuildPrereq: qt-static

* Sun Mar 20 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.2.0-0vl2
- rebuild for VineSeed

* Sun Mar 20 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.2.0-0vl1
- new upstream release
- update %%files
- add +w to %%{_prefix}/kdevbdb/*

* Sun Jan  2 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.1.2-0vl2
- rebuild for VineSeed

* Sun Jan  2 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.1.2-0vl1
- new upstream release
- update %%files

* Thu Oct 21 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.1.1-0vl1
- source upgrade
- add BuildPrereq: qt-static

* Wed Aug 11 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.0.4-0vl2
- rebuild with qt32

* Wed Jun 16 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.0.4-0vl1
- source upgrade
- remove lines about vine26

* Sat May  1 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.0.3-0vl1
- source upgrade
- add Requires: ctags

* Tue Mar 23 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.0.2-0vl1
- source upgrade
- remove all patches
- remove c references
- add Requires: htdig

* Fri Feb 20 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.1.5-0vl0
- change spec to build both VineSeed and Vine2.5/2.6
- change configure options
- add %%clean section
- add Requires: kdbg kdoc kdegraphics kdeutils kdesdk

* Tue Dec 16 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.1.5-0vl1
- source upgrade
- change spec to build both VineSeed and Vine2.5/2.6
- change configure option (add -enable--final, remove -enable--debug)
- update %%files section

* Thu Oct 24 2002 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.1.3-0vl1
- source upgrade
- remove patch1 (rejected) 

* Sat Oct 19 2002 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.1.2-0vl2
- BuildPrereq: autoconf253 objprelink2 instead of autoconf252 objprelink

* Sun Jul 14 2002 AKIYAMA Kazuhito <akiyama@karen.servepics.com> 2.1.2-0vl1
- source upgrade
- revised Source1
- remove Patch1 and Patch4

* Sun Jul 14 2002 AKIYAMA Kazuhito <akiyama@karen.servepics.com> 2.1.1-3vl1
- merged with rawhide 2.1.1-3
- clean up spec
- add BuildPrereq: objprelink (i386 only)
- remove Obsoletes: kdevelop-c_c++_ref
- add BuildPrereq: autoconf252 automake15
- There is Vine's previous changes, hacked for Vine 
 -- Sat Mar 23 2002 AKIYAMA Kazuhito <akiyama@karen.servepics.com> 2.0.2-2vl1
  - build for VineSeed
  - delete Epoch
  - update Patch1 and delete Patch2

* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Wed Jun 19 2002 Than Ngo <than@redhat.com> 2.1.1-2
- don't forcibly strip binaries

* Sun Jun  2 2002 Than Ngo <than@redhat.com> 2.1.1-1
- 2.1.1

* Sun May 26 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Thu May 23 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.1-3
- Use automake15

* Tue Apr 16 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.1-2
- Change sonames

* Wed Mar 27 2002 Than Ngo <than@redhat.com> 2.1-1
- final

* Wed Mar 27 2002 Than Ngo <than@redhat.com> 2.1-0.cvs20020326.1
- update

* Wed Mar 20 2002 Than Ngo <than@redhat.com> 2.1rc3-1
- update to 2.1rc3

* Sun Mar 17 2002 Than Ngo <than@redhat.com> 2.1rc2-1
- update to 2.1rc2

* Sun Mar 10 2002 Than Ngo <than@redhat.com> 2.1beta2-3
- rebuild against new kdelibs

* Sun Mar 10 2002 Than Ngo <than@redhat.com> 2.1beta2-2
- fixed Strange characters appear in the output window (bug #59217)
- fixed return-line feed sign in Kdevelop setup tool (bug #55032)

* Wed Mar  8 2002 Than Ngo <than@redhat.com> 2.1beta2-1
- update to 2.1beta2

* Wed Jan 16 2002 Than Ngo <than@redhat.com> 2.1beta1-2
- rebuild against new kdelibs

* Wed Jan  9 2002 Than Ngo <than@redhat.com> 2.1beta1-1
- update to 2.1 beta1
- fix build against gcc 3
- fix some typo bugs
- get rid of libkfile
- update c_cpp_reference to 2.0.1

* Mon Oct 22 2001 Than Ngo <than@redhat.com> 2.0-1
- add patch to show non lattin1 font in build-in editor correct (bug #54457)

* Sat Sep 22 2001 Than Ngo <than@redhat.com> 2.0-2
- fix a bug in creating documentation index when running KDevelop Setup (bug #52760)
- backport some major bugfixes from 2.0.1

* Mon Jul 30 2001 Bernhard Rosenkraenzer <bero@redhat.com> 2.0-0.cvs20010730.1
- Don't crash on startup

* Tue Jul 24 2001 Bernhard Rosenkraenzer <bero@redhat.com> 2.0-0.cvs20010724.1
- Fix file list

* Mon Jul 23 2001 Bernhard Rosenkraenzer <bero@redhat.com> 2.0-0.cvs20010723.1
- Update

* Mon Feb 26 2001 Bernhard Rosenkraenzer <bero@redhat.com>
- Yet another respin - printing was broken.

* Sat Feb 24 2001 Bernhard Rosenkraenzer <bero@redhat.com>
- Update the C/C++ reference guide docs. The older version had a
  couple of examples that won't work with gcc 2.96-*

* Thu Feb 22 2001 Than Ngo <than@redhat.com>
- fix version number

* Wed Feb 21 2001 Than Ngo <than@redhat.com>
- 1.4-respin

* Tue Feb 20 2001 Bernhard Rosenkraenzer <bero@redhat.com>
- 1.4

* Wed Feb 14 2001 Than Ngo <than@redhat.com>
- update (only bugfixes)
- fix up kdelibs documentation path
- fix a dependency problem with kde-i18n package (Bug #27675)
- add qt-designer into requires

* Sun Feb 11 2001 Than Ngo <than@redhat.com>
- fixed to build on s390

* Tue Feb 06 2001 Than Ngo <than@redhat.com>
- update, only bugfixes

* Wed Jan 24 2001 Than Ngo <than@redhat.com>
- hacked for building of KDE references

* Tue Jan 23 2001 Than Ngo <than@redhat.com>
- work-around to build on alpha

* Mon Jan 22 2001 Bernhard Rosenkraenzer <bero@redhat.com>
- Update

* Wed Jan 10 2001 Than Ngo <than@redhat.com>
- update new snapshot, only require KDE2/Qt2

* Fri Dec 22 2000 Than Ngo <than@redhat.com>
- fixed dependency problem with kde-i18n

* Thu Dec 21 2000 Than Ngo <than@redhat.com>
- updated to 1.4beta1 with KDE2 support
- fixed to build on s390
- fixed some broken codes
 
* Fri Dec 8 2000 Than Ngo <than@redhat.com>
- fixed for building on ia64
 
* Wed Nov 15 2000 Than Ngo <than@redhat.com>
- build snapshot 20001112, it works now with KDE2 and kde1-compat
- fix libtool to build on sparc and alpha
- don't use make -j
 
* Sun Aug 13 2000 Than Ngo <than@redhat.com>
- fix kdelibsdoc-dir to show kdelibs-1.1.2 html docu correct
 
* Tue Aug 01 2000 Than Ngo <than@redhat.de>
- add missing ldconfig in %post and %postun section (Bug #14924)
- add missing C references stuff to kdevelop
 
* Sun Jul 30 2000 Than Ngo <than@redhat.de>
- rebuilt against compat-egcs-c++, put KDE1 under /usr
- cleanup specfile
 
* Tue Jul 25 2000 Than Ngo <than@redhat.de>
- fix dependency problem
 
* Wed Jul 19 2000 Than Ngo <than@redhat.de>
- rebuilt against compat-libstdc++
 
* Mon Jul 17 2000 Than Ngo <than@redhat.de>
- install under /usr/share instead /usr/lib/kde1-compat/share,
  fix dependency problem
 
* Sat Jul 15 2000 Than Ngo <than@redhat.de>
- rebuilt with egcs-c++-1.1.2

* Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild
 
* Mon Jul 03 2000 Than Ngo <than@redhat.de>
- fix docdir
- add requires kdebase
 
* Sun Jul 02 2000 Than Ngo <than@redhat.de>
- rebuilt with  kde1-compat
 
* Sun Jun 18 2000 Than Ngo <than@redhat.de>
- rebuilt in the new build environment, fix docdir
- FHS packaging
 
* Thu Jun 08 2000 Than Ngo <than@redhat.de>
- update to 1.2
- move from powertools to main CD
- use %%configure
 
* Mon Apr 3 2000 Ngo Than <than@redhat.de>
- fix up reference (Bug #10368)
 
* Tue Feb 15 2000 Bernhard Rosenkr舅zer <bero@redhat.com>
- Fix up documentation path (Bug #7291)
- Update to current stable branch - this should fix up the debugger problem
- clean up spec file
 
* Fri Jan  6 2000 Bernhard Rosenkr舅zer <bero@redhat.com>
- Update to current stable branch
- Adapt to 6.2 Qt libraries
- Use BuildPrereq
 
* Wed Jan 05 2000 Ngo Than <than@redhat.de>
- added patch for alpha
 
* Tue Dec 21 1999 Ngo Than <than@redhat.de>
- updated kdevelop-1.0 release
 
* Tue Nov 16 1999 Preston Brown <pbrown@redhat.com>
- kdevelop 1.0beta4.1, docdir added, using DESTDIR env. variable.
 
* Thu Sep 09 1999 Preston Brown <pbrown@redhat.com>
- initial packaging for 6.1.