summaryrefslogtreecommitdiffstats
path: root/redhat/dependencies/tqscintilla/tqscintilla-14.0.0.spec
blob: 134b4e99f959d13ac7d399c0434ec0b2d789c0b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# Default version for this component
%define tdecomp tqscintilla
%define tde_version 14.0.0

# If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt".
%if "%{?tde_prefix}" != "/usr"
%define _variant .opt
%endif

# TDE specific building variables
%define tde_bindir %{tde_prefix}/bin
%define tde_datadir %{tde_prefix}/share
%define tde_docdir %{tde_datadir}/doc
%define tde_includedir %{tde_prefix}/include
%define tde_libdir %{tde_prefix}/%{_lib}
%define tde_mandir %{tde_datadir}/man

%define tde_tdeappdir %{tde_datadir}/applications/kde
%define tde_tdedocdir %{tde_docdir}/tde
%define tde_tdeincludedir %{tde_includedir}/tde
%define tde_tdelibdir %{tde_libdir}/trinity

%define _docdir %{tde_docdir}


Name:			trinity-%{tdecomp}
Summary:		TQt source code editing component based on Scintilla
Version:		1.7.1
Release:		%{?!preversion:1}%{?preversion:0_%{preversion}}%{?dist}%{?_variant}

License:	GPLv2+
Group:		Development/Tools

Vendor:		Trinity Project
Packager:	Francois Andriot <francois.andriot@free.fr>
Url:		http://www.riverbankcomputing.co.uk/qscintilla/

Prefix:		%{_prefix}
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Source0:		%{name}-%{tde_version}%{?preversion:~%{preversion}}.tar.gz

# Fix FTBFS when using TQT3
Patch0:		tqscintilla-14.0.0-ftbfs.patch

BuildRequires:	trinity-tqtinterface-devel >= %{tde_version}
BuildRequires:	trinity-tdelibs-devel >= %{tde_version}
BuildRequires:	trinity-tdebase-devel >= %{tde_version}
BuildRequires:	desktop-file-utils
BuildRequires:	gettext

%description
Scintilla is a free source code editing component. It has features found
in standard editing components, as well as features especially useful
when editing and debugging source code.

TQScintilla is a port or Scintilla to the TQt GUI toolkit.


%package designer
Summary:        TQScintilla designer plugin 
Group:          Development/Tools
Requires:       %{name} = %{version}-%{release}
Requires:       trinity-tqt3-designer

%description designer
%{summary}.

%package devel
Summary:        TQScintilla Development Files
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       trinity-tqt3-devel 

%description devel
%{summary}.

%package doc
Summary:        TQScintilla Documentation
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description doc
%{summary}.

%prep
%setup -q -n %{name}-%{tde_version}%{?preversion:~%{preversion}}
%patch0 -p1 -b .ftbfs

%__sed -i "designer/designer.pro" \
  -e "s|\$(QTDIR)|%{_libdir}/tqt3|" \
  -e "s|# DESTDIR|DESTDIR|"

export QTDIR=%{_libdir}/tqt3
( cd qt; tqmake "DESTDIR=$PWD/../tmplib" )
( cd designer; tqmake )


%build
unset QTDIR QTINC QTLIB
export PATH="%{tde_bindir}:${PATH}"
export LDFLAGS="-L%{tde_libdir} -I%{tde_includedir}"

%__make %{?_smp_mflags} -C qt
%__make %{?_smp_mflags} -C designer


%install
unset QTDIR QTINC QTLIB
export QTDIR=%{_libdir}/tqt3
%__rm -rf $RPM_BUILD_ROOT

# Installs the QT part
%__make INSTALL_ROOT=$RPM_BUILD_ROOT -C qt install

# Installs supplementary headers
for i in include/*.h; do
	%__install -D -m 644 $i %{buildroot}${QTINC}/private/${i##*/}
done

# Installs the HTML documentation
for i in doc/html/*; do
	%__install -D -m 644 $i %{buildroot}%{tde_docdir}/HTML/en/%{name}/${i##*/}
done

# Installs the Designer plugin
for i in designer/*.so; do
	%__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
%__mv -f %{buildroot}/private %{buildroot}%{_includedir}/tqt3
%__mv -f %{buildroot}%{_includedir}/tqt3 %{buildroot}%{_includedir}/tqscintilla

%clean
%__rm -rf $RPM_BUILD_ROOT


%post
/sbin/ldconfig

%postun
/sbin/ldconfig

%post devel
/sbin/ldconfig

%postun devel
/sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc ChangeLog LICENSE NEWS README
%{_libdir}/libqscintilla.so.*
%{_datadir}/tqt3/translations/*.qm

%files designer
%defattr(-,root,root,-)
%{_libdir}/tqt3/plugins/designer/*.so

%files devel
%defattr(-,root,root,-)
%doc doc/html doc/Scintilla example
%{_includedir}/tqscintilla/*.h
%{_includedir}/tqscintilla/private/*.h
%{_libdir}/libqscintilla.so

%files doc
%defattr(-,root,root,-)
%{tde_docdir}/HTML/en/%{name}

%changelog
* Fri Jul 05 2013 Francois Andriot <francois.andriot@free.fr> - 1.7.1-1
- Initial release for TDE 14.0.0