summaryrefslogtreecommitdiffstats
path: root/developer-doc/phb/rpm-example.docbook
blob: bbbb2810e688f07b9926739c78e795e841041d9c (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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
<appendix id="rpm-example">
<title>RPM SPEC file example</title>
<para>
This appendix contains an example of an RPM SPEC file.
</para>

<programlisting>

#
# spec file for package kmymoney
#
# Copyright  (c)  2002,2003,2004,2005  Thomas Baumgart
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# please send bugfixes or comments to kmymoney2-developer@lists.sourceforge.net
#

%define is_mandrake %(test -e /etc/mandrake-release &amp;&amp; echo 1 || echo 0)
%define is_suse %(test -e /etc/SuSE-release &amp;&amp; echo 1 || echo 0)
%define is_fedora %(test -e /etc/fedora-release &amp;&amp; echo 1 || echo 0)

%define dist redhat
%define disttag rh

%if %is_mandrake
%define dist mandrake
%define disttag mdk
%endif
%if %is_suse
%define dist suse
%define disttag suse
%define kde_path /opt/trinity
%endif
%if %is_fedora
%define dist fedora
%define disttag rhfc
%endif

%define _bindir		%kde_path/bin
%define _datadir	%kde_path/share
%define _iconsdir	%_datadir/icons
%define _docdir		%_datadir/doc
%define _localedir	%_datadir/locale
%define qt_path		/usr/lib/qt3

%define distver %(release="`rpm -q --queryformat='%{VERSION}' %{dist}-release 2> /dev/null | tr . : | sed s/://g`" ; if test $? != 0 ; then release="" ; fi ; echo "$release")
%define distlibsuffix %(%_bindir/tde-config --libsuffix 2>/dev/null)
%define _lib lib%distlibsuffix
%define packer %(finger -lp `echo "$USER"` | head -n 1 | cut -d: -f 3)

Name:      kmymoney
Icon:      kmymoney.xpm
Summary:   The Personal Finances Manager for KDE.
Version:   0.8
Release:   1.%{disttag}%{distver}
License:   GPL
Vendor:    The KMyMoney development team &lt;kmymoney2-developers@lists.sourceforge.net&gt;
Packager:  %packer
Group:     Productivity/Office/Finance
Source0:   %{name}2-%version.tar.bz2
BuildRoot: %{_tmppath}/%{name}2-%{version}-%{release}-build
BuildRequires: tdebase3-devel
Prereq: /sbin/ldconfig

%description
KMyMoney is the Personal Finance Manager for the KDE environment.
It provides the functions required to balance your checkbooks,
manage your personal accounts, investments, loans and
categorise your incomes and expenses.

For the most up-to-date information and sources please
visit the project web-site at http://kmymoney2.sourceforge.net/.

To stay informed about new releases and other user related topics,
please register with the KMyMoney User Mailinglist. It's a low volume
mailing list. More information how to register can be found on the
projects's web-site.

%package devel
#Requires:
Summary: KMyMoney development files
Group: Productivity/Office/Finance
Provides: kmymoney-devel

%description devel
This package contains necessary header files for KMyMoney development.

This package is necessary to compile plugins for KMyMoney.

%package ofx
Requires: kmymoney
Summary: KMyMoney OFX plugin
Group: Productivity/Office/Finance
Provides: kmymoney-ofx

%description ofx
This package contains necessary files for the KMyMoney OFX plugin.


%prep
#echo %_target
#echo %_target_alias
#echo %_target_cpu
#echo %_target_os
#echo %_target_vendor
echo Building %{name}-%{version}-%{release}

%setup -q -n %{name}2-%{version}

%build
CFLAGS="%optflags" CXXFLAGS="%{optflags}" \
        ./configure --mandir=%{_mandir}\
	            --disable-rpath \
		    --with-xinerama \
		    --without-gl \
		    --disable-debug \
		    --disable-cppunit \
		    --enable-final

make

%install
make DESTDIR=%buildroot install

%clean
[ ${RPM_BUILD_ROOT} != "/" ] &amp;&amp; rm -rf ${RPM_BUILD_ROOT}

%post
cd %_docdir/HTML/*/%{name}2
ln -s ../common common
/sbin/ldconfig

%postun
/sbin/ldconfig

%files
%defattr(-,root,root)

%dir %_docdir/HTML/en/%{name}2/
%doc %_docdir/HTML/*/%{name}2/*.docbook
%doc %_docdir/HTML/*/%{name}2/*.png
%doc %_docdir/HTML/*/%{name}2/index.cache.bz2

# the binary files
%{_bindir}/%{name}
%{_bindir}/%{name}2

# the shared libraries
%kde_path/%_lib/*.so.*.*.*

#
%dir %_datadir/apps/
%dir %_datadir/apps/%{name}2/
%dir %_datadir/apps/%{name}2/html
%dir %_datadir/apps/%{name}2/templates
%dir %_datadir/apps/%{name}2/templates/C
%dir %_datadir/apps/%{name}2/templates/de_DE
%dir %_datadir/apps/%{name}2/templates/en_GB
%dir %_datadir/apps/%{name}2/templates/en_US
%dir %_datadir/apps/%{name}2/templates/fr_FR
%dir %_datadir/apps/%{name}2/templates/pt_BR
%dir %_datadir/apps/%{name}2/templates/ru_SU
%_datadir/apps/%{name}2/templates/README
%_datadir/apps/%{name}2/templates/*/*.kmt

%_datadir/apps/%{name}2/*rc
%_datadir/apps/%{name}2/html/*
%_datadir/apps/%{name}2/tips

%dir %_datadir/apps/%{name}2/pics/
%_datadir/apps/%{name}2/pics/*.png

%dir %_datadir/apps/%{name}2/icons/
%dir %_datadir/apps/%{name}2/icons/hicolor/
%dir %_datadir/apps/%{name}2/icons/hicolor/16x16/
%dir %_datadir/apps/%{name}2/icons/hicolor/16x16/actions/
%dir %_datadir/apps/%{name}2/icons/hicolor/22x22/
%dir %_datadir/apps/%{name}2/icons/hicolor/22x22/actions/
%dir %_datadir/apps/%{name}2/icons/hicolor/32x32/
%dir %_datadir/apps/%{name}2/icons/hicolor/32x32/apps
%dir %_datadir/apps/%{name}2/icons/hicolor/48x48/
%dir %_datadir/apps/%{name}2/icons/hicolor/48x48/apps
%dir %_datadir/apps/%{name}2/icons/hicolor/64x64/
%dir %_datadir/apps/%{name}2/icons/hicolor/64x64/apps
%_datadir/apps/%{name}2/icons/hicolor/*/*/*.png

#
#
%_datadir/applications/tde/kmymoney2.desktop
%_datadir/mimelnk/application/x-kmymoney2.desktop
%_datadir/servicetypes/*

#
#
%_iconsdir/*/*/*/*.png

#
#
%doc %_mandir/man1/kmymoney2.1.gz

#
#
%_localedir/*/*/*.mo


# AqBanking plugin related files
# %dir %_datadir/apps/kmm_kbanking/
# %_datadir/apps/kmm_kbanking/*rc

# plugin related files
# %kde_path/%_lib/trinity/*.so




%files ofx
%_datadir/services/kmm_ofximport.desktop
%kde_path/%_lib/trinity/kmm_ofximport.so


%files devel
%kde_path/include/kmymoney/*
%kde_path/%_lib/*.la

# plugin related files
%kde_path/%_lib/trinity/*.la

%changelog
* Mon May 26 2005 - ipwizard (at) users.sourceforge.net
- Added kmymoney-ofx package

* Tue Mar 22 2005 - ipwizard (at) users.sourceforge.net
- Added more template functionality to provide more
  distributions
- Added kmymoney-devel package

* Mon Jan 30 2005 - ipwizard (at) users.sourceforge.net
- Started adding distro independant layout

* Sat Oct 30 2004 - ipwizard (at) users.sourceforge.net
  * Preparations for 0.6.3

* Thu Sep 23 2004 - ipwizard (at) users.sourceforge.net
  * Preparations for 0.6.2

* Sat Jun  5 2004 - ipwizard (at) users.sourceforge.net
- Preparations for 0.6

* Thu Apr 22 2004 - ipwizard (at) users.sourceforge.net
- Preparations for 0.6rc4

* Fri Feb 20 2004 - ipwizard (at) users.sourceforge.net
- Removed the standard directories
- Uninstall the default account files also
- Preparations for 0.6rc3

* Thu Feb 5  2004 - ipwizard (at) users.sourceforge.net
- Remove CVS directories from SRPMS
- Preparations for 0.6rc2

* Mon Dec 29 2003 - ipwizard (at) users.sourceforge.net
- Preparations for 0.6rc1
- Incorporated some changes from SuSE distro
- added man page file

* Thu Jan 9 2003 - ipwizard (at) users.sourcforge.net
- Added missing files home.html and kmymoney2.css

* Mon Dec 16 2002 - ipwizard (at) users.sourcforge.net
- Removed make command only required for CVS download
- Update version to match filename

* Sun Dec 15 2002 - ipwizard (at) users.sourcforge.net
- Updated for version 0.51

* Tue Jan 15 2002 - ipwizard (at) users.sourcforge.net
- Initial implementation

</programlisting>
</appendix>