| 1 |
<!DOCTYPE html> |
| 2 |
<html><head> |
| 3 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
| 4 |
<title>highlight.spec</title> |
| 5 |
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (RPM Spec) - Theme (Breeze Dark)"/> |
| 6 |
</head><body style="background-color:#232629;color:#cfcfc2"><pre> |
| 7 |
<span style="color:#7a7c7d;"># Test file for rpmspec.xml</span> |
| 8 |
|
| 9 |
<span style="color:#7a7c7d;"># Comments start with a # in column="0":</span> |
| 10 |
|
| 11 |
<span style="color:#7a7c7d;"># Some comment</span> |
| 12 |
|
| 13 |
<span style="color:#7a7c7d;"># When they don't start in column="0", that they are recognized as comments, but with an alert:</span> |
| 14 |
<span style="color:#da4453;text-decoration:underline;"> </span><span style="color:#7a7c7d;"># This is a bad comment.</span> |
| 15 |
<span style="color:#7a7c7d;"># RPM spec says clear that comments must start at the begin of the line. However, in practice</span> |
| 16 |
<span style="color:#7a7c7d;"># the RPM software is more permissive, depending on the context. But for our syntax highlighting,</span> |
| 17 |
<span style="color:#7a7c7d;"># we give, while recognizing the as comment, at least a little alert. Comments should not contain</span> |
| 18 |
<span style="color:#7a7c7d;"># the character </span><span style="color:#da4453;text-decoration:underline;">%</span><span style="color:#7a7c7d;"> (which is marked as warning), but 2 of them are okay: %%. </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold;">TODO</span><span style="color:#7a7c7d;"> is higlighted.</span> |
| 19 |
|
| 20 |
<span style="color:#7a7c7d;"># A spec file starts with "Normal" context. Here, you can specify values for some tags:</span> |
| 21 |
<span style="color:#2980b9;">Name: </span><span style="color:#f44f4f;">kradioripper-unstable</span> <span style="color:#da4453;text-decoration:underline;">#</span> <span style="color:#da4453;text-decoration:underline;">Note</span> <span style="color:#da4453;text-decoration:underline;">that</span> <span style="color:#da4453;text-decoration:underline;">here</span> <span style="color:#da4453;text-decoration:underline;">in</span> <span style="color:#da4453;text-decoration:underline;">no</span> <span style="color:#da4453;text-decoration:underline;">comment</span> <span style="color:#da4453;text-decoration:underline;">possible!</span> |
| 22 |
<span style="color:#2980b9;">Name: </span><span style="color:#f44f4f;">name</span> <span style="color:#da4453;text-decoration:underline;">only</span> <span style="color:#da4453;text-decoration:underline;">_one_</span> <span style="color:#da4453;text-decoration:underline;">word</span> <span style="color:#da4453;text-decoration:underline;">allowed</span> |
| 23 |
<span style="color:#2980b9;">Name: </span><span style="color:#8e44ad;">%macro</span><span style="color:#f44f4f;"> no further syntax check after macro!</span> |
| 24 |
<span style="color:#7a7c7d;"># Some tags support only _one_ word as value</span> |
| 25 |
<span style="color:#2980b9;">Version: </span><span style="color:#f44f4f;">0.4test5</span> <span style="color:#da4453;text-decoration:underline;">up-from-the-space-this-is-an-error</span> |
| 26 |
<span style="color:#7a7c7d;"># Some tag can have parameters: Any char in paranthesis:</span> |
| 27 |
<span style="color:#2980b9;">Summary: </span><span style="color:#f44f4f;">Recorder for internet radios (based on Streamripper) </span> |
| 28 |
<span style="color:#2980b9;">Summary(de.UTF-8): </span><span style="color:#f44f4f;">Aufnahmeprogramm für Internetradios (basiert auf Streamripper)</span> |
| 29 |
<span style="color:#7a7c7d;"># requiere free text:</span> |
| 30 |
<span style="color:#2980b9;">License: </span><span style="color:#f44f4f;">License 1 2 3</span> |
| 31 |
<span style="color:#7a7c7d;"># requiere a well defines value:</span> |
| 32 |
<span style="color:#2980b9;">Requires( / ( = ): </span><span style="color:#27ae60;">Some</span><span style="font-weight:bold;">,</span><span style="color:#27ae60;"> value</span><span style="font-weight:bold;">()</span> |
| 33 |
<span style="color:#7a7c7d;"># new type "switch" accepts: yes, no, 0, 1</span> |
| 34 |
<span style="color:#2980b9;">AutoReq: </span><span style="color:#27ae60;">yes</span> |
| 35 |
<span style="color:#2980b9;">AutoReq: </span><span style="color:#27ae60;">yes</span> <span style="color:#da4453;text-decoration:underline;">invalid</span> |
| 36 |
<span style="color:#2980b9;">AutoReq: </span><span style="color:#8e44ad;">%macro</span><span style="color:#27ae60;"> no further syntax check after macro!</span> |
| 37 |
<span style="color:#2980b9;">AutoReq: </span><span style="color:#27ae60;">no</span> |
| 38 |
<span style="color:#2980b9;">AutoReq: </span><span style="color:#27ae60;">0</span> |
| 39 |
<span style="color:#2980b9;">AutoReq: </span><span style="color:#27ae60;">1</span> |
| 40 |
<span style="color:#7a7c7d;"># requiere a number:</span> |
| 41 |
<span style="color:#2980b9;">Epoch: </span><span style="color:#f67400;">123123</span> |
| 42 |
<span style="color:#2980b9;">Epoch: </span><span style="color:#f67400;">123123</span> <span style="color:#da4453;text-decoration:underline;">invalid</span> |
| 43 |
<span style="color:#2980b9;">Epoch: </span><span style="color:#8e44ad;">%macro</span><span style="color:#f67400;"> no further syntax check afer macro!</span> |
| 44 |
<span style="color:#7a7c7d;"># If tags are used that are not known, they are not highlighted:</span> |
| 45 |
<span style="color:#da4453;text-decoration:underline;">Invalidtag:</span> <span style="color:#da4453;text-decoration:underline;">Some</span> <span style="color:#da4453;text-decoration:underline;">value</span> |
| 46 |
<span style="color:#da4453;text-decoration:underline;">Invalid</span> <span style="color:#da4453;text-decoration:underline;">content</span> <span style="color:#da4453;text-decoration:underline;">in</span> <span style="color:#da4453;text-decoration:underline;">this</span> <span style="color:#da4453;text-decoration:underline;">section</span> <span style="color:#da4453;text-decoration:underline;">(only</span> <span style="color:#da4453;text-decoration:underline;">tags</span> <span style="color:#da4453;text-decoration:underline;">are</span> <span style="color:#da4453;text-decoration:underline;">allowed)</span> |
| 47 |
|
| 48 |
<span style="color:#7a7c7d;"># You can use conditions in specs (highlighted with region markers):</span> |
| 49 |
<span style="color:#fdbc4b;font-weight:bold;">%if</span> <span style="color:#f67400;">0</span><span style="color:#8e44ad;">%{?mandriva_version}</span> |
| 50 |
<span style="color:#7a7c7d;"># numbers and strings are distingished: string:</span> |
| 51 |
<span style="color:#fdbc4b;font-weight:bold;">%if</span> <span style="color:#f44f4f;">lsdksfj</span> |
| 52 |
<span style="color:#7a7c7d;"># number:</span> |
| 53 |
<span style="color:#fdbc4b;font-weight:bold;">%if</span> <span style="color:#f67400;">23472398</span> |
| 54 |
<span style="color:#7a7c7d;"># string:</span> |
| 55 |
<span style="color:#fdbc4b;font-weight:bold;">%if</span> <span style="color:#f44f4f;">lksdjfsl72939</span> |
| 56 |
<span style="color:#7a7c7d;"># invalid:</span> |
| 57 |
<span style="color:#fdbc4b;font-weight:bold;">%if</span> <span style="color:#f67400;">92437</span><span style="color:#f44f4f;">lsdkfjdsl</span> |
| 58 |
<span style="color:#7a7c7d;"># valid:</span> |
| 59 |
<span style="color:#fdbc4b;font-weight:bold;">%if</span> <span style="color:#f44f4f;">"lsdfj </span><span style="color:#8e44ad;">%ksdf(sdfs)</span><span style="color:#f44f4f;"> 3489"</span> |
| 60 |
<span style="color:#2980b9;">Release: </span><span style="color:#8e44ad;">%mkrel</span><span style="color:#f44f4f;"> 1.2</span> |
| 61 |
<span style="color:#fdbc4b;font-weight:bold;">%else</span> |
| 62 |
<span style="color:#2980b9;">Release: </span><span style="color:#f44f4f;">0</span> |
| 63 |
<span style="color:#fdbc4b;font-weight:bold;">%endif</span> |
| 64 |
<span style="color:#7a7c7d;"># requiere a well defined value:</span> |
| 65 |
<span style="color:#fdbc4b;font-weight:bold;">%ifos</span> <span style="color:#da4453;text-decoration:underline;">fixed_value</span> |
| 66 |
<span style="color:#7a7c7d;"># You must use these special macros (%%if etc.) always at the start of the line - if not,</span> |
| 67 |
<span style="color:#7a7c7d;"># that's bad but not an arror. You must also always use the specified form. Everything else is an</span> |
| 68 |
<span style="color:#7a7c7d;"># error:</span> |
| 69 |
<span style="color:#fdbc4b;font-weight:bold;">%if</span> |
| 70 |
<span style="color:#da4453;text-decoration:underline;">something</span> <span style="color:#da4453;text-decoration:underline;">%if</span> |
| 71 |
<span style="color:#8e44ad;">%{if}</span> |
| 72 |
<span style="color:#da4453;text-decoration:underline;">%if</span>(some options) |
| 73 |
<span style="color:#7a7c7d;"># However, this are different macros and therefore correct:</span> |
| 74 |
<span style="color:#8e44ad;">%ifx</span> |
| 75 |
<span style="color:#8e44ad;">%{ifx}</span> |
| 76 |
<span style="color:#8e44ad;">%ifx(some options)</span> |
| 77 |
|
| 78 |
<span style="color:#7a7c7d;"># the \ is escaped in the line. At the end of the line it escapes the line break:</span> |
| 79 |
<span style="color:#da4453;text-decoration:underline;">echo</span> <span style="color:#da4453;text-decoration:underline;">This</span> <span style="color:#da4453;text-decoration:underline;">is</span> <span style="color:#da4453;text-decoration:underline;">\"</span> <span style="color:#da4453;text-decoration:underline;">a</span> <span style="color:#da4453;text-decoration:underline;">text</span> <span style="color:#da4453;text-decoration:underline;">\\</span> <span style="color:#da4453;text-decoration:underline;">and</span> <span style="color:#da4453;text-decoration:underline;">here\</span> |
| 80 |
<span style="color:#da4453;text-decoration:underline;">it</span> <span style="color:#da4453;text-decoration:underline;">continues.</span> |
| 81 |
|
| 82 |
<span style="font-weight:bold;">%define</span> <span style="color:#27ae60;">name</span><span style="color:#f44f4f;"> value</span> |
| 83 |
<span style="font-weight:bold;">%define</span> <span style="color:#da4453;text-decoration:underline;">invalid_näme</span><span style="color:#f44f4f;"> value</span> |
| 84 |
<span style="font-weight:bold;">%define</span> <span style="color:#27ae60;">macroname</span><span style="color:#f44f4f;"> multi</span><span style="font-weight:bold;">\</span> |
| 85 |
<span style="color:#f44f4f;">line content with references like </span><span style="color:#8e44ad;">%0</span><span style="color:#f44f4f;"> </span><span style="color:#8e44ad;">%*</span><span style="color:#f44f4f;"> </span><span style="color:#8e44ad;">%#</span><span style="color:#f44f4f;"> </span><span style="color:#8e44ad;">%{-f}</span><span style="color:#f44f4f;"> </span><span style="color:#8e44ad;">%{-f*}</span><span style="color:#f44f4f;"> </span><span style="color:#8e44ad;">%1</span><span style="color:#f44f4f;"> </span><span style="color:#8e44ad;">%2</span><span style="color:#f44f4f;"> and so on</span> |
| 86 |
<span style="font-weight:bold;">%global</span> <span style="color:#27ae60;">name</span><span style="color:#f44f4f;"> value</span> |
| 87 |
<span style="font-weight:bold;">%global</span> <span style="color:#da4453;text-decoration:underline;">invalid_näme</span><span style="color:#f44f4f;"> value</span> |
| 88 |
<span style="font-weight:bold;">%undefine</span> <span style="color:#27ae60;">name</span> |
| 89 |
<span style="font-weight:bold;">%undefine</span> <span style="color:#27ae60;">name</span> <span style="color:#da4453;text-decoration:underline;">too-many-parameters</span> |
| 90 |
|
| 91 |
<span style="color:#7a7c7d;"># shell command</span> |
| 92 |
<span style="font-weight:bold;">%define</span> <span style="color:#27ae60;">buildoutputdir</span><span style="color:#f44f4f;"> </span><span style="color:#8e44ad;">%{expand:</span>build/jdk<span style="color:#8e44ad;">%{featurever}</span>.build<span style="color:#8e44ad;">%{?1}}</span> |
| 93 |
<span style="font-weight:bold;">%define</span> <span style="color:#27ae60;">buildoutputdir()</span><span style="color:#f44f4f;"> </span><span style="color:#8e44ad;">%{expand:</span>build/jdk<span style="color:#8e44ad;">%{featurever}</span>.build<span style="color:#8e44ad;">%{?1}}</span> |
| 94 |
<span style="font-weight:bold;">%define</span> <span style="color:#27ae60;">save_alternatives()</span><span style="color:#f44f4f;"> </span><span style="color:#8e44ad;">%{expand:</span> |
| 95 |
<span style="color:#7a7c7d;"># bash comment</span> |
| 96 |
<span style="font-weight:bold;">function</span> foo <span style="font-weight:bold;">{</span> |
| 97 |
LANG=en_US.UTF-8 alternatives --display <span style="color:#f44f4f;">"</span><span style="color:#27aeae;">$MASTER</span><span style="color:#f44f4f;">"</span> |
| 98 |
<span style="font-weight:bold;">}</span> |
| 99 |
MASTER=<span style="color:#f44f4f;">"</span><span style="color:#8e44ad;">%{?1}</span><span style="color:#f44f4f;">"</span> |
| 100 |
rm -f <span style="color:#8e44ad;">%{_localstatedir}</span>/lib/rpm-state/<span style="color:#f44f4f;">"</span><span style="color:#27aeae;">$MASTER</span><span style="color:#f44f4f;">"</span>_<span style="color:#27aeae;">$FAMILY</span> <span style="color:#2980b9;">> /dev/null</span> |
| 101 |
<span style="font-weight:bold;">if</span> foo <span style="color:#2980b9;">> /dev/null</span> <span style="color:#3f8058;">|</span> bar -q <span style="color:#3f8058;">;</span> <span style="font-weight:bold;">then</span> |
| 102 |
zeta 2 <span style="color:#2980b9;">></span> <span style="color:#8e44ad;">%{_localstatedir}</span>/lib/rpm-state/<span style="color:#f44f4f;">"</span><span style="color:#27aeae;">$MASTER</span><span style="color:#f44f4f;">"</span>_<span style="color:#f44f4f;">"</span><span style="color:#27aeae;">$FAMILY</span><span style="color:#f44f4f;">"</span> |
| 103 |
<span style="font-weight:bold;">fi</span> |
| 104 |
<span style="color:#8e44ad;">}</span> |
| 105 |
|
| 106 |
<span style="color:#7a7c7d;"># lua command</span> |
| 107 |
<span style="font-weight:bold;">%define</span> <span style="color:#27ae60;">save_alternatives()</span><span style="color:#f44f4f;"> </span><span style="color:#8e44ad;">%{lua:</span> |
| 108 |
<span style="color:#7a7c7d;">-- a lua code</span> |
| 109 |
<span style="font-weight:bold;">local</span> <span style="color:#27aeae;">posix</span> <span style="color:#3f8058;">=</span> <span style="color:#8e44ad;">require</span> <span style="color:#f44f4f;">"posix"</span> |
| 110 |
<span style="color:#fdbc4b;font-weight:bold;">if</span> <span style="color:#3f8058;">(</span><span style="color:#8e44ad;">os.getenv</span><span style="color:#3f8058;">(</span><span style="color:#f44f4f;">"debug"</span><span style="color:#3f8058;">)</span> <span style="color:#3f8058;">==</span> <span style="color:#f44f4f;">"true"</span><span style="color:#3f8058;">)</span> <span style="color:#fdbc4b;font-weight:bold;">then</span> |
| 111 |
<span style="color:#27aeae;">debug</span> <span style="color:#3f8058;">=</span> <span style="font-weight:bold;">true</span><span style="color:#3f8058;">;</span> |
| 112 |
<span style="color:#8e44ad;">print</span><span style="color:#3f8058;">(</span><span style="color:#f44f4f;">"debug"</span><span style="color:#3f8058;">)</span> |
| 113 |
<span style="color:#fdbc4b;font-weight:bold;">else</span> |
| 114 |
<span style="color:#27aeae;">debug</span> <span style="color:#3f8058;">=</span> <span style="font-weight:bold;">false</span><span style="color:#3f8058;">;</span> |
| 115 |
<span style="color:#fdbc4b;font-weight:bold;">end</span> |
| 116 |
<span style="color:#8e44ad;">}</span> |
| 117 |
|
| 118 |
|
| 119 |
<span style="color:#7a7c7d;"># This special comment is treated and highlighted like a tag:</span> |
| 120 |
<span style="color:#2980b9;"># norootforbuild</span> |
| 121 |
<span style="color:#7a7c7d;"># It can't have parameters, so every following non-whitespace character is not good:</span> |
| 122 |
<span style="color:#2980b9;"># norootforbuild</span> <span style="color:#da4453;text-decoration:underline;">DONT</span> <span style="color:#da4453;text-decoration:underline;">WRITE</span> <span style="color:#da4453;text-decoration:underline;">ANYTHING</span> <span style="color:#da4453;text-decoration:underline;">HERE!</span> |
| 123 |
<span style="color:#7a7c7d;"># wrong spacing is also recognized:</span> |
| 124 |
<span style="color:#da4453;text-decoration:underline;"># norootforbuild</span> |
| 125 |
<span style="color:#7a7c7d;"># and also an indeet is not fine for norootforbuild:</span> |
| 126 |
<span style="color:#da4453;text-decoration:underline;"> </span><span style="color:#da4453;text-decoration:underline;"># norootforbuild</span> |
| 127 |
|
| 128 |
<span style="color:#7a7c7d;"># This following "Conflicts" tag will be removed by set-version.sh, </span> |
| 129 |
<span style="color:#7a7c7d;"># if it is a "kradioripper" release (and not a "kradioripper-unstable" release)... </span> |
| 130 |
<span style="color:#2980b9;">Conflicts: </span><span style="color:#27ae60;">kradioripper </span> |
| 131 |
|
| 132 |
|
| 133 |
<span style="color:#2980b9;background-color:#153042;">%description</span> |
| 134 |
<span style="color:#7a7c7d;"># Here, a new section starts. It contains a value for the RPM field "description" and is therefor</span> |
| 135 |
<span style="color:#7a7c7d;"># colored like values:</span> |
| 136 |
<span style="color:#f44f4f;">A KDE program for ripping internet radios. Based on StreamRipper. </span> |
| 137 |
<span style="color:#f44f4f;"> </span> |
| 138 |
<span style="color:#f44f4f;"> </span> |
| 139 |
<span style="color:#7a7c7d;"># A section start can have parameters:</span> |
| 140 |
<span style="color:#2980b9;background-color:#153042;">%description</span> -l de.UTF-8 |
| 141 |
<span style="color:#f44f4f;">Ein KDE-Aufnahmeprogramm für Internetradios. Basiert auf StreamRipper. </span> |
| 142 |
<span style="color:#f44f4f;"> </span> |
| 143 |
<span style="color:#7a7c7d;"># These sections starts are errors:</span> |
| 144 |
<span style="color:#f44f4f;"> </span><span style="color:#da4453;text-decoration:underline;">%description</span><span style="color:#f44f4f;"> not at the first line</span> |
| 145 |
<span style="color:#8e44ad;">%{description}</span><span style="color:#f44f4f;"> wrong form</span> |
| 146 |
<span style="color:#da4453;text-decoration:underline;">%description</span><span style="color:#f44f4f;">(no options allowed, only parameters!)</span> |
| 147 |
<span style="color:#f44f4f;"> </span> |
| 148 |
<span style="color:#f44f4f;"> </span> |
| 149 |
<span style="color:#2980b9;background-color:#153042;">%prep</span> |
| 150 |
<span style="color:#7a7c7d;"># This starts a section that defines the commands to prepare the build.</span> |
| 151 |
<span style="color:#7a7c7d;"># q means quit. n sets the directory: </span> |
| 152 |
<span style="color:#8e44ad;">%setup</span> -q -n kradioripper |
| 153 |
echo Test |
| 154 |
<span style="color:#7a7c7d;"># Macros can have different forms: Valid:</span> |
| 155 |
<span style="color:#8e44ad;">%abc</span> |
| 156 |
<span style="color:#8e44ad;">%abc</span>ÄndOfMacro |
| 157 |
<span style="color:#8e44ad;">%abc(def)</span>EndOfMacro |
| 158 |
<span style="color:#8e44ad;">%{abc}</span>EndOfMacro |
| 159 |
<span style="color:#8e44ad;">%{something but no single </span><span style="color:#da4453;text-decoration:underline;">%</span><span style="color:#8e44ad;">}</span>EndOfMacro |
| 160 |
<span style="color:#8e44ad;">%{abc:def}</span>EndOfMacro |
| 161 |
<span style="color:#8e44ad;">%(</span>abc<span style="color:#8e44ad;">)</span> |
| 162 |
<span style="color:#7a7c7d;"># Invalid:</span> |
| 163 |
<span style="color:#da4453;text-decoration:underline;">%</span>ÄInvalidChar |
| 164 |
<span style="color:#da4453;text-decoration:underline;">%</span> |
| 165 |
<span style="color:#da4453;text-decoration:underline;">%</span>) |
| 166 |
<span style="color:#da4453;text-decoration:underline;">%</span>} |
| 167 |
<span style="color:#7a7c7d;"># You can use macros inside of macro calls: Fine:</span> |
| 168 |
<span style="color:#8e44ad;">%{something %but no %{sin%(</span>fine<span style="color:#8e44ad;">)gle} }</span>EndOfMacro |
| 169 |
<span style="color:#7a7c7d;"># Bad:</span> |
| 170 |
<span style="color:#8e44ad;">%{No closing paranthesis </span><span style="color:#da4453;text-decoration:underline;">(</span><span style="color:#8e44ad;">No syntax highlightig for this error available</span><span style="color:#da4453;text-decoration:underline;">)</span> |
| 171 |
|
| 172 |
|
| 173 |
<span style="color:#2980b9;background-color:#153042;">%build</span> |
| 174 |
cmake ./ -DCMAKE_INSTALL_PREFIX=<span style="color:#8e44ad;">%{_prefix}</span> |
| 175 |
<span style="color:#8e44ad;">%__make</span> <span style="color:#8e44ad;">%{?jobs:-j %jobs}</span> |
| 176 |
<span style="color:#8e44ad;">%{!?_licensedir:%global license </span><span style="color:#3daee9;">%%</span><span style="color:#8e44ad;">doc}</span> |
| 177 |
|
| 178 |
|
| 179 |
<span style="color:#2980b9;background-color:#153042;">%install</span> |
| 180 |
<span style="color:#fdbc4b;font-weight:bold;">%if</span> <span style="color:#f67400;">0</span><span style="color:#8e44ad;">%{?suse_version}</span> |
| 181 |
<span style="color:#8e44ad;">%makeinstall</span> |
| 182 |
<span style="color:#8e44ad;">%suse_update_desktop_file</span> kradioripper |
| 183 |
<span style="color:#fdbc4b;font-weight:bold;">%endif</span> |
| 184 |
<span style="color:#fdbc4b;font-weight:bold;">%if</span> <span style="color:#f67400;">0</span><span style="color:#8e44ad;">%{?fedora_version}</span> <span style="font-weight:bold;">||</span> <span style="color:#f67400;">0</span><span style="color:#8e44ad;">%{?rhel_version}</span> <span style="font-weight:bold;">||</span> <span style="font-weight:bold;">!</span><span style="color:#f67400;">0</span><span style="color:#8e44ad;">%{?centos_version}</span> |
| 185 |
make install DESTDIR=<span style="color:#8e44ad;">%{buildroot}</span> |
| 186 |
desktop-file-install --delete-original --vendor fedora --dir=<span style="color:#8e44ad;">%{buildroot}</span>/<span style="color:#8e44ad;">%{_datadir}</span>/applications/kde4 <span style="color:#8e44ad;">%{buildroot}</span>/<span style="color:#8e44ad;">%{_datadir}</span>/applications/kde4/kradioripper.desktop |
| 187 |
<span style="color:#fdbc4b;font-weight:bold;">%endif</span> |
| 188 |
<span style="color:#fdbc4b;font-weight:bold;">%if</span> <span style="color:#f67400;">0</span><span style="color:#8e44ad;">%{?mandriva_version}</span> |
| 189 |
<span style="color:#8e44ad;">%makeinstall_std</span> |
| 190 |
<span style="color:#fdbc4b;font-weight:bold;">%endif</span> |
| 191 |
|
| 192 |
|
| 193 |
<span style="color:#2980b9;background-color:#153042;">%clean</span> |
| 194 |
rm -rf <span style="color:#f44f4f;">"</span><span style="color:#8e44ad;">%{buildroot}</span><span style="color:#f44f4f;">"</span> |
| 195 |
|
| 196 |
|
| 197 |
<span style="color:#2980b9;background-color:#153042;">%files</span> |
| 198 |
<span style="color:#8e44ad;">%defattr(-,root,root)</span> |
| 199 |
<span style="color:#fdbc4b;font-weight:bold;">%if</span> <span style="color:#f67400;">0</span><span style="color:#8e44ad;">%{?fedora_version}</span> <span style="font-weight:bold;">||</span> <span style="color:#f67400;">0</span><span style="color:#8e44ad;">%{?rhel_version}</span> <span style="font-weight:bold;">||</span> <span style="color:#f67400;">0</span><span style="color:#8e44ad;">%{?centos_version}</span> |
| 200 |
<span style="color:#8e44ad;">%{_datadir}</span>/applications/kde4/fedora-kradioripper.desktop |
| 201 |
<span style="color:#fdbc4b;font-weight:bold;">%else</span> |
| 202 |
<span style="color:#8e44ad;">%{_datadir}</span>/applications/kde4/kradioripper.desktop |
| 203 |
<span style="color:#fdbc4b;font-weight:bold;">%endif</span> |
| 204 |
<span style="color:#8e44ad;">%{_bindir}</span>/kradioripper |
| 205 |
<span style="color:#8e44ad;">%{_datadir}</span>/locale/*/LC_MESSAGES/kradioripper.mo |
| 206 |
<span style="color:#fdbc4b;font-weight:bold;">%if</span> <span style="color:#f67400;">0</span><span style="color:#8e44ad;">%{?mandriva_version}</span> |
| 207 |
<span style="color:#7a7c7d;"># </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold;">TODO</span><span style="color:#7a7c7d;"> The %%doc macro is actually broken for mandriva 2009 in build service...</span> |
| 208 |
<span style="color:#8e44ad;">%dir</span> <span style="color:#8e44ad;">%{_datadir}</span>/apps/kradioripper |
| 209 |
<span style="color:#8e44ad;">%{_datadir}</span>/apps/kradioripper/* |
| 210 |
<span style="color:#fdbc4b;font-weight:bold;">%else</span> |
| 211 |
<span style="color:#8e44ad;">%doc</span> COPYING LICENSE LICENSE.GPL2 LICENSE.GPL3 NEWS WARRANTY |
| 212 |
<span style="color:#8e44ad;">%dir</span> <span style="color:#8e44ad;">%{_datadir}</span>/kde4/apps/kradioripper |
| 213 |
<span style="color:#8e44ad;">%{_datadir}</span>/kde4/apps/kradioripper/* |
| 214 |
<span style="color:#fdbc4b;font-weight:bold;">%endif</span> |
| 215 |
|
| 216 |
<span style="color:#7a7c7d;"># lua section</span> |
| 217 |
<span style="color:#2980b9;background-color:#153042;">%pretrans</span> headless -p <lua> |
| 218 |
<span style="color:#7a7c7d;">-- a lua code</span> |
| 219 |
<span style="font-weight:bold;">local</span> <span style="color:#27aeae;">posix</span> <span style="color:#3f8058;">=</span> <span style="color:#8e44ad;">require</span> <span style="color:#f44f4f;">"posix"</span> |
| 220 |
<span style="color:#fdbc4b;font-weight:bold;">if</span> <span style="color:#3f8058;">(</span><span style="color:#8e44ad;">os.getenv</span><span style="color:#3f8058;">(</span><span style="color:#f44f4f;">"debug"</span><span style="color:#3f8058;">)</span> <span style="color:#3f8058;">==</span> <span style="color:#f44f4f;">"true"</span><span style="color:#3f8058;">)</span> <span style="color:#fdbc4b;font-weight:bold;">then</span> |
| 221 |
<span style="color:#27aeae;">debug</span> <span style="color:#3f8058;">=</span> <span style="font-weight:bold;">true</span><span style="color:#3f8058;">;</span> |
| 222 |
<span style="color:#8e44ad;">print</span><span style="color:#3f8058;">(</span><span style="color:#f44f4f;">"debug"</span><span style="color:#3f8058;">)</span> |
| 223 |
<span style="color:#fdbc4b;font-weight:bold;">else</span> |
| 224 |
<span style="color:#27aeae;">debug</span> <span style="color:#3f8058;">=</span> <span style="font-weight:bold;">false</span><span style="color:#3f8058;">;</span> |
| 225 |
<span style="color:#fdbc4b;font-weight:bold;">end</span> |
| 226 |
|
| 227 |
<span style="color:#2980b9;background-color:#153042;">%changelog</span><span style="color:#f44f4f;"> </span> |
| 228 |
<span style="color:#2980b9;">* Sun May 04 2008 [email protected]</span> |
| 229 |
<span style="color:#f44f4f;">- some text</span> |
| 230 |
<span style="color:#f44f4f;">- some text</span> |
| 231 |
<span style="color:#f44f4f;"> in two lines</span> |
| 232 |
<span style="color:#f44f4f;">- some text</span> |
| 233 |
<span style="color:#f44f4f;"> in two lines</span> |
| 234 |
<span style="color:#f44f4f;"> + with subtext</span> |
| 235 |
<span style="color:#f44f4f;"> - and more subtext</span> |
| 236 |
<span style="color:#f44f4f;"> in two lines</span> |
| 237 |
<span style="color:#2980b9;">* Tue Apr 24 2007 Name</span> |
| 238 |
<span style="color:#f44f4f;">- text</span> |
| 239 |
<span style="color:#f44f4f;"> * When the star isn't at column 0, than it doesn't indicate</span> |
| 240 |
<span style="color:#f44f4f;"> a new date</span> |
| 241 |
<span style="color:#2980b9;">* </span><span style="color:#da4453;text-decoration:underline;">Wen</span><span style="color:#2980b9;"> Sep 08 2003 Wrong weekday</span> |
| 242 |
<span style="color:#2980b9;">* Mon </span><span style="color:#da4453;text-decoration:underline;">Mai</span><span style="color:#2980b9;"> 08 2003 Wrong month</span> |
| 243 |
<span style="color:#2980b9;">* Mon Sep </span><span style="color:#da4453;text-decoration:underline;">0</span><span style="color:#2980b9;"> 2003 bad day</span> |
| 244 |
<span style="color:#2980b9;">* Mon Sep 8 2003 good day</span> |
| 245 |
<span style="color:#2980b9;">* Mon Sep 08 2003 good day</span> |
| 246 |
<span style="color:#2980b9;">* Mon Sep </span><span style="color:#da4453;text-decoration:underline;">32</span><span style="color:#2980b9;"> 2003 bad day</span> |
| 247 |
<span style="color:#2980b9;">* Mon Sep 08 </span><span style="color:#da4453;text-decoration:underline;">03</span><span style="color:#2980b9;"> bad year</span> |
| 248 |
<span style="color:#2980b9;">* Mon Sep 08 2003 Name</span> |
| 249 |
<span style="color:#7a7c7d;"># When using macros, the error check is disabled:</span> |
| 250 |
<span style="color:#2980b9;">* </span><span style="color:#8e44ad;">%myDataMacro</span><span style="color:#2980b9;"> Title of the entry</span> |
| 251 |
<span style="color:#f44f4f;">- Text</span> |
| 252 |
<span style="color:#f44f4f;"> - can</span> |
| 253 |
<span style="color:#f44f4f;"> - be</span> |
| 254 |
<span style="color:#f44f4f;"> - indeeded</span> |
| 255 |
<span style="color:#f44f4f;"> - without</span> |
| 256 |
<span style="color:#f44f4f;"> - problems</span> |
| 257 |
</pre></body></html> |