1
# Test file for rpmspec.xml
3
# Comments start with a # in column="0":
7
# When they don't start in column="0", that they are recognized as comments, but with an alert:
8
# This is a bad comment.
9
# RPM spec says clear that comments must start at the begin of the line. However, in practice
10
# the RPM software is more permissive, depending on the context. But for our syntax highlighting,
11
# we give, while recognizing the as comment, at least a little alert. Comments should not contain
12
# the character % (which is marked as warning), but 2 of them are okay: %%. TODO is higlighted.
14
# A spec file starts with "Normal" context. Here, you can specify values for some tags:
15
Name: kradioripper-unstable # Note that here in no comment possible!
16
Name: name only _one_ word allowed
17
Name: %macro no further syntax check after macro!
18
# Some tags support only _one_ word as value
19
Version: 0.4test5 up-from-the-space-this-is-an-error
20
# Some tag can have parameters: Any char in paranthesis:
21
Summary: Recorder for internet radios (based on Streamripper)
22
Summary(de.UTF-8): Aufnahmeprogramm für Internetradios (basiert auf Streamripper)
24
License: License 1 2 3
25
# requiere a well defines value:
26
Requires( / ( = ): Some, value()
27
# new type "switch" accepts: yes, no, 0, 1
30
AutoReq: %macro no further syntax check after macro!
37
Epoch: %macro no further syntax check afer macro!
38
# If tags are used that are not known, they are not highlighted:
39
Invalidtag: Some value
40
Invalid content in this section (only tags are allowed)
42
# You can use conditions in specs (highlighted with region markers):
43
%if 0%{?mandriva_version}
44
# numbers and strings are distingished: string:
53
%if "lsdfj %ksdf(sdfs) 3489"
58
# requiere a well defined value:
60
# You must use these special macros (%%if etc.) always at the start of the line - if not,
61
# that's bad but not an arror. You must also always use the specified form. Everything else is an
67
# However, this are different macros and therefore correct:
72
# the \ is escaped in the line. At the end of the line it escapes the line break:
73
echo This is \" a text \\ and here\
77
%define invalid_näme value
78
%define macroname multi\
79
line content with references like %0 %* %# %{-f} %{-f*} %1 %2 and so on
81
%global invalid_näme value
83
%undefine name too-many-parameters
85
# This special comment is treated and highlighted like a tag:
87
# It can't have parameters, so every following non-whitespace character is not good:
88
# norootforbuild DONT WRITE ANYTHING HERE!
89
# wrong spacing is also recognized:
91
# and also an indeet is not fine for norootforbuild:
94
# This following "Conflicts" tag will be removed by set-version.sh,
95
# if it is a "kradioripper" release (and not a "kradioripper-unstable" release)...
96
Conflicts: kradioripper
100
# Here, a new section starts. It contains a value for the RPM field "description" and is therefor
101
# colored like values:
102
A KDE program for ripping internet radios. Based on StreamRipper.
105
# A section start can have parameters:
106
%description -l de.UTF-8
107
Ein KDE-Aufnahmeprogramm für Internetradios. Basiert auf StreamRipper.
109
# These sections starts are errors:
110
%description not at the first line
111
%{description} wrong form
112
%description(no options allowed, only parameters!)
116
# This starts a section that defines the commands to prepare the build.
117
# q means quit. n sets the directory:
118
%setup -q -n kradioripper
120
# Macros can have different forms: Valid:
125
%{something but no single %}EndOfMacro
133
# You can use macros inside of macro calls: Fine:
134
%{something %but no %{sin%(fine)gle} }EndOfMacro
136
%{No closing paranthesis (No syntax highlightig for this error available)
140
cmake ./ -DCMAKE_INSTALL_PREFIX=%{_prefix}
141
%__make %{?jobs:-j %jobs}
145
%if 0%{?suse_version}
147
%suse_update_desktop_file kradioripper
149
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
150
make install DESTDIR=%{buildroot}
151
desktop-file-install --delete-original --vendor fedora --dir=%{buildroot}/%{_datadir}/applications/kde4 %{buildroot}/%{_datadir}/applications/kde4/kradioripper.desktop
153
%if 0%{?mandriva_version}
159
rm -rf "%{buildroot}"
163
%defattr(-,root,root)
164
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
165
%{_datadir}/applications/kde4/fedora-kradioripper.desktop
167
%{_datadir}/applications/kde4/kradioripper.desktop
169
%{_bindir}/kradioripper
170
%{_datadir}/locale/*/LC_MESSAGES/kradioripper.mo
171
%if 0%{?mandriva_version}
172
# TODO The %%doc macro is actually broken for mandriva 2009 in build service...
173
%dir %{_datadir}/apps/kradioripper
174
%{_datadir}/apps/kradioripper/*
176
%doc COPYING LICENSE LICENSE.GPL2 LICENSE.GPL3 NEWS WARRANTY
177
%dir %{_datadir}/kde4/apps/kradioripper
178
%{_datadir}/kde4/apps/kradioripper/*
183
* Sun May 04 2008 email@email.com
192
* Tue Apr 24 2007 Name
194
* When the star isn't at column 0, than it doesn't indicate
196
* Wen Sep 08 2003 Wrong weekday
197
* Mon Mai 08 2003 Wrong month
198
* Mon Sep 0 2003 bad day
199
* Mon Sep 8 2003 good day
200
* Mon Sep 08 2003 good day
201
* Mon Sep 32 2003 bad day
202
* Mon Sep 08 03 bad year
203
* Mon Sep 08 2003 Name
204
# When using macros, the error check is disabled:
205
* %myDataMacro Title of the entry