|
|
@ -21,9 +21,6 @@
|
|
|
|
%define tde_version 14.1.0
|
|
|
|
%define tde_version 14.1.0
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
%define tde_pkg tqscintilla
|
|
|
|
%define tde_pkg tqscintilla
|
|
|
|
%define tde_prefix /opt/trinity
|
|
|
|
|
|
|
|
%define tde_datadir %{tde_prefix}/share
|
|
|
|
|
|
|
|
%define tde_tdedocdir %{tde_datadir}/doc/tde
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?mdkversion} || 0%{?mgaversion} || 0%{?pclinuxos}
|
|
|
|
%if 0%{?mdkversion} || 0%{?mgaversion} || 0%{?pclinuxos}
|
|
|
|
%define libtqscintilla %{_lib}tqscintilla
|
|
|
|
%define libtqscintilla %{_lib}tqscintilla
|
|
|
@ -58,9 +55,10 @@ Source1: trinity-tqscintilla-rpmlintrc
|
|
|
|
BuildRequires: trinity-tdelibs-devel >= %{tde_version}
|
|
|
|
BuildRequires: trinity-tdelibs-devel >= %{tde_version}
|
|
|
|
BuildRequires: trinity-filesystem >= %{tde_version}
|
|
|
|
BuildRequires: trinity-filesystem >= %{tde_version}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: desktop-file-utils
|
|
|
|
BuildRequires: desktop-file-utils
|
|
|
|
BuildRequires: gettext
|
|
|
|
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
|
|
|
BuildRequires: gettext
|
|
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
%description
|
|
|
|
Scintilla is a free source code editing component. It has features found
|
|
|
|
Scintilla is a free source code editing component. It has features found
|
|
|
@ -94,7 +92,6 @@ TQScintilla is a port or Scintilla to the TQt GUI toolkit.
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc ChangeLog LICENSE NEWS README
|
|
|
|
%doc ChangeLog LICENSE NEWS README
|
|
|
|
%{_libdir}/libqscintilla.so.7
|
|
|
|
%{_libdir}/libqscintilla.so.7
|
|
|
|
%{_libdir}/libqscintilla.so.7.0
|
|
|
|
|
|
|
|
%{_libdir}/libqscintilla.so.7.0.1
|
|
|
|
%{_libdir}/libqscintilla.so.7.0.1
|
|
|
|
%{_libdir}/tqt3/plugins/designer/*.so
|
|
|
|
%{_libdir}/tqt3/plugins/designer/*.so
|
|
|
|
%dir %{_datadir}/tqt3/translations/
|
|
|
|
%dir %{_datadir}/tqt3/translations/
|
|
|
@ -120,9 +117,12 @@ This package contains the development files for tqscintilla.
|
|
|
|
|
|
|
|
|
|
|
|
%files -n %{libtqscintilla}-devel
|
|
|
|
%files -n %{libtqscintilla}-devel
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc doc/Scintilla example
|
|
|
|
#%doc doc/Scintilla example
|
|
|
|
%{_includedir}/tqscintilla/
|
|
|
|
%{_includedir}/tqscintilla/
|
|
|
|
%{_libdir}/libqscintilla.so
|
|
|
|
%{_libdir}/libqscintilla.so
|
|
|
|
|
|
|
|
%{_libdir}/pkgconfig/qscintilla.pc
|
|
|
|
|
|
|
|
%exclude %{_libdir}/libqscintilla.la
|
|
|
|
|
|
|
|
%exclude %{_libdir}/tqt3/plugins/designer/*.la
|
|
|
|
|
|
|
|
|
|
|
|
##########
|
|
|
|
##########
|
|
|
|
|
|
|
|
|
|
|
@ -138,7 +138,8 @@ This package contains the documentation for tqscintilla.
|
|
|
|
|
|
|
|
|
|
|
|
%files -n %{libtqscintilla}-doc
|
|
|
|
%files -n %{libtqscintilla}-doc
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{tde_tdedocdir}/HTML/en/%{name}/
|
|
|
|
%{_docdir}/libtqscintilla7/
|
|
|
|
|
|
|
|
%{_docdir}/libtqscintilla/HTML/en/tqscintilla/
|
|
|
|
|
|
|
|
|
|
|
|
##########
|
|
|
|
##########
|
|
|
|
|
|
|
|
|
|
|
@ -151,74 +152,37 @@ This package contains the documentation for tqscintilla.
|
|
|
|
%prep
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{name}-%{tde_version}%{?preversion:~%{preversion}}
|
|
|
|
%setup -q -n %{name}-%{tde_version}%{?preversion:~%{preversion}}
|
|
|
|
|
|
|
|
|
|
|
|
# Fix path in project files
|
|
|
|
|
|
|
|
%__sed -i "qt/qscintilla.pro" \
|
|
|
|
|
|
|
|
-e "s|^INCLUDEPATH = .*|INCLUDEPATH = . ../include ../src /usr/include/tqt /usr/include/tqt3|" \
|
|
|
|
|
|
|
|
-e "s|^header.path = .*|header.path = %{_includedir}/tqt3|" \
|
|
|
|
|
|
|
|
-e "s|^trans.path = .*|trans.path = %{_datadir}/tqt3/translations|"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%__sed -i "designer/designer.pro" \
|
|
|
|
|
|
|
|
-e "s|\$(TQTDIR)|%{_libdir}/tqt3|" \
|
|
|
|
|
|
|
|
-e "s|# DESTDIR|DESTDIR|"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export QTDIR=%{_libdir}/tqt3
|
|
|
|
|
|
|
|
export TQTDIR=%{_prefix}
|
|
|
|
|
|
|
|
( cd qt; tqmake "DESTDIR=$PWD/../tmplib" )
|
|
|
|
|
|
|
|
( cd designer; tqmake )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%build
|
|
|
|
unset QTDIR QTINC QTLIB
|
|
|
|
unset QTDIR QTINC QTLIB
|
|
|
|
export PATH="%{tde_bindir}:${PATH}"
|
|
|
|
export PATH="%{tde_bindir}:${PATH}"
|
|
|
|
|
|
|
|
|
|
|
|
# Workaround strange tqmake behaviour in RHEL5
|
|
|
|
if ! rpm -E %%cmake|grep -q "cd build"; then
|
|
|
|
%if 0%{?rhel} == 5
|
|
|
|
%__mkdir_p build
|
|
|
|
%__sed -i "qt/Makefile" -e "s|..\/..\/..\/..\/..|%{_prefix}|g"
|
|
|
|
cd build
|
|
|
|
%endif
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%cmake \
|
|
|
|
|
|
|
|
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
|
|
|
|
|
|
|
|
-DCMAKE_C_FLAGS="${RPM_OPT_FLAGS}" \
|
|
|
|
|
|
|
|
-DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS}" \
|
|
|
|
|
|
|
|
-DCMAKE_NO_BUILTIN_CHRPATH=ON \
|
|
|
|
|
|
|
|
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
|
|
|
|
|
|
|
-DWITH_GCC_VISIBILITY=ON \
|
|
|
|
|
|
|
|
\
|
|
|
|
|
|
|
|
-DBUILD_ALL="ON" \
|
|
|
|
|
|
|
|
-DWITH_ALL_OPTIONS="ON" \
|
|
|
|
|
|
|
|
..
|
|
|
|
|
|
|
|
|
|
|
|
export QTDIR=%{_libdir}/tqt3
|
|
|
|
%__make %{?_smp_mflags} || %__make
|
|
|
|
export TQTDIR=%{_prefix}
|
|
|
|
|
|
|
|
%__make %{?_smp_mflags} -C qt
|
|
|
|
|
|
|
|
%__make %{?_smp_mflags} -C designer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
%install
|
|
|
|
unset QTDIR QTINC QTLIB
|
|
|
|
%__rm -rf %{?buildroot}
|
|
|
|
export QTDIR=%{_libdir}/tqt3
|
|
|
|
%__make install -C build DESTDIR=%{?buildroot}
|
|
|
|
export TQTDIR=%{_prefix}
|
|
|
|
|
|
|
|
%__rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Installs the QT part
|
|
|
|
# Fix headers location
|
|
|
|
%__make INSTALL_ROOT=$RPM_BUILD_ROOT -C qt install
|
|
|
|
%__mv "%{?buildroot}%{_includedir}/tqt3" "%{?buildroot}%{_includedir}/tqscintilla"
|
|
|
|
|
|
|
|
|
|
|
|
# Installs supplementary headers
|
|
|
|
|
|
|
|
for i in include/*.h; do
|
|
|
|
|
|
|
|
%__install -D -m 644 $i %{buildroot}${QTINC}/private/${i##*/}
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Installs the HTML documentation correctly
|
|
|
|
|
|
|
|
for i in doc/html/*; do
|
|
|
|
|
|
|
|
%__install -D -m 644 $i %{buildroot}%{tde_tdedocdir}/HTML/en/%{name}/${i##*/}
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Installs the Designer plugin
|
|
|
|
|
|
|
|
for i in designer/*.so ${QTDIR}/plugins/designer/*.so ${TQTDIR}/plugins/designer/*.so; do
|
|
|
|
|
|
|
|
[ -r "${i}" ] || continue
|
|
|
|
|
|
|
|
%__install -D -m 644 $i %{buildroot}${QTDIR}/plugins/designer/${i##*/}
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Installs libraries
|
|
|
|
|
|
|
|
%__mkdir_p %{buildroot}%{_libdir}
|
|
|
|
|
|
|
|
%__mv -f tmplib/* %{buildroot}%{_libdir}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Fix private headers location
|
|
|
|
|
|
|
|
%__mkdir_p %{buildroot}%{_includedir}
|
|
|
|
|
|
|
|
%__mv -f %{buildroot}/private %{buildroot}%{_includedir}/tqt3
|
|
|
|
|
|
|
|
%__mv -f %{buildroot}%{_includedir}/tqt3 %{buildroot}%{_includedir}/tqscintilla
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Fix permissions
|
|
|
|
|
|
|
|
chmod a-x %{buildroot}%{_includedir}/tqscintilla/*.h
|
|
|
|
|
|
|
|
chmod a-x %{buildroot}%{_includedir}/tqscintilla/*.h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%clean
|
|
|
|
%clean
|
|
|
|