summaryrefslogtreecommitdiffstats
path: root/redhat/applications/kmymoney/trinity-kmymoney-3.5.13.spec
blob: c0af9baf62ce76247ff501c2cff6819d4fb0adf3 (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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# Default version for this component
%define kdecomp kmymoney
%define version 1.0.5
%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.13 specific building variables
BuildRequires: autoconf automake libtool m4
%define tde_docdir %{_docdir}/kde
%define tde_includedir %{_includedir}/kde
%define tde_libdir %{_libdir}/trinity


Name:		trinity-%{kdecomp}
Summary:	personal finance manager for TDE

Version:	%{?version}
Release:	%{?release}%{?dist}%{?_variant}

License:	GPLv2+
Group:		Applications/Utilities

Vendor:		Trinity Project
Packager:	Francois Andriot <francois.andriot@free.fr>
URL:		http://www.trinitydesktop.org/

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

Source0:	%{kdecomp}-3.5.13.tar.gz
Source1:	kmymoneytitlelabel.png
Patch0:		kmymoney-3.5.13-recode_ftbfs.patch

## TDE Commit: 2a54aa58cfe166f48d6f1395cbc6c9bfd5e31bfc
Patch1:		kmymoney-3.5.13-lots_of_crash.patch

## TDE Commit: 8654cea10f6902719006d5975db7dc07b2fcc713
Patch2:		kmymoney-3.5.13-update_to_1.0.5.patch

BuildRequires: tqtinterface-devel
BuildRequires: trinity-arts-devel
BuildRequires: trinity-kdelibs-devel
BuildRequires: trinity-kdebase-devel
BuildRequires: desktop-file-utils

BuildRequires: recode
BuildRequires: html2ps
BuildRequires: opensp-devel
BuildRequires: libofx-devel

Requires:		%{name}-common == %{version}

%description
KMyMoney is the Personal Finance Manager for TDE. It operates similar to
MS-Money and Quicken, supports different account types, categorisation of
expenses, QIF import/export, multiple currencies and initial online banking
support.


%package common
Summary:	KMyMoney architecture independent files
Group:		Applications/Utilities
Requires:	%{name} == %{version}

%description common
This package contains architecture independent files needed for KMyMoney to
run properly. It also provides KMyMoney documentation. Therefore, unless you
have '%{name}' package installed, you will hardly find this package useful.


%package devel
Summary:	KMyMoney development files
Group:		Development/Libraries
Requires:	%{name} == %{version}

%description devel
This package contains development files needed for KMyMoney plugins.


%prep
%setup -q -n applications/%{kdecomp}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%__install -m644 %{SOURCE1} kmymoney2/widgets/

# Ugly hack to modify TQT include directory inside autoconf files.
# If TQT detection fails, it fallbacks to TQT4 instead of TQT3 !
%__sed -i admin/acinclude.m4.in \
  -e "s,/usr/include/tqt,%{_includedir}/tqt,g" \
  -e "s,kde_htmldir='.*',kde_htmldir='%{tde_docdir}/HTML',g"

%__cp -f "/usr/share/aclocal/libtool.m4" "admin/libtool.m4.in"
%__cp -f "/usr/share/libtool/config/ltmain.sh" "admin/ltmain.sh"
%__make -f "admin/Makefile.common"


%build
export PATH="%{_bindir}:${PATH}"
export LDFLAGS="-L%{_libdir} -I%{_includedir}"

%configure \
	--disable-rpath \
    --with-extra-includes=%{_includedir}/tqt \
    --enable-closure \
    --enable-pdf-docs \
    --enable-ofxplugin \
    --enable-ofxbanking \
    --enable-qtdesigner \
    --enable-sqlite3

%__make %{?_smp_mflags}


%install
export PATH="%{_bindir}:${PATH}"
%__rm -rf %{buildroot}
%__make install DESTDIR=%{buildroot}



## File lists
# HTML (1.0)
HTML_DIR=$(kde-config --expandvars --install html)
if [ -d %{buildroot}$HTML_DIR ]; then
	for lang_dir in %{buildroot}$HTML_DIR/* ; do
	  if [ -d $lang_dir ]; then
		lang=$(basename $lang_dir)
		echo "%lang($lang) $HTML_DIR/$lang/*" >> %{name}.lang
		# replace absolute symlinks with relative ones
		pushd $lang_dir
		  for i in *; do
			[ -d $i -a -L $i/common ] && rm -f $i/common && ln -sf ../common $i/common
		  done
		popd
	  fi
	done
fi

%clean
%__rm -rf %{buildroot}


%post
/sbin/ldconfig
touch --no-create %{_datadir}/icons/hicolor || :
gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :

%postun
/sbin/ldconfig
touch --no-create %{_datadir}/icons/hicolor || :
gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :

%files
%defattr(-,root,root,-)
%{_bindir}/kmymoney
%{_bindir}/kmymoney2
%{_datadir}/applications/kde/kmymoney2.desktop
%{_datadir}/mimelnk/application/x-kmymoney2.desktop
%{_datadir}/servicetypes/kmymoneyimporterplugin.desktop
%{_datadir}/servicetypes/kmymoneyplugin.desktop
%{_libdir}/*.so.*
%{tde_libdir}/kmm_ofximport.la
%{tde_libdir}/kmm_ofximport.so

%files common
%defattr(-,root,root,-)
%{_datadir}/apps/kmymoney2/html/
%{_datadir}/apps/kmymoney2/icons/*/*/*/*.png
%{_datadir}/apps/kmymoney2/kmymoney2ui.rc
%{_datadir}/apps/kmymoney2/misc/financequote.pl
%{_datadir}/apps/kmymoney2/pics/*.png
%{_datadir}/apps/kmymoney2/templates/*/*.kmt
%{_datadir}/apps/kmymoney2/tips
%{_datadir}/config.kcfg/kmymoney2.kcfg
%{_datadir}/icons/*/*/*/*.png
%{_datadir}/icons/*/*/*.svgz
%{_datadir}/locale/*/LC_MESSAGES/*.mo
%{tde_docdir}/HTML/en/kmymoney2/*.docbook
%{tde_docdir}/HTML/en/kmymoney2/*.png
%{tde_docdir}/HTML/en/kmymoney2/common
%{tde_docdir}/HTML/en/kmymoney2/index.cache.bz2
%{_mandir}/man1/kmymoney2.*
%{_datadir}/apps/kmm_ofximport/kmm_ofximport.rc
%{_datadir}/services/kmm_ofximport.desktop


%files devel
%defattr(-,root,root,-)
%{_includedir}/kmymoney/*.h
%{_libdir}/libkmm_kdchart.la
%{_libdir}/libkmm_mymoney.la
%{_libdir}/libkmm_plugin.la
%{_libdir}/*.so
%{_usr}/%{_lib}/qt-3.3/plugins/sqldrivers/libsqlite3*.so
%{_usr}/%{_lib}/qt-3.3/plugins/designer/libkmymoney.so

%Changelog
* Sun Jan 15 2012 Francois Andriot <francois.andriot@free.fr> - 1.0.5-1
- Updates to upstream 1.0.5

* Sun Oct 30 2011 Francois Andriot <francois.andriot@free.fr> - 1.0.4-1
- Initial release for TDE 3.5.13 on RHEL 6, RHEL 5 and Fedora 15