]> git.pld-linux.org Git - packages/highlight.git/blob - highlight.spec
up to 4.4
[packages/highlight.git] / highlight.spec
1 #
2 # Conditional build:
3 %bcond_with     apidocs # don't generate apidocs subpackage
4 %bcond_without  gui # don't build Qt GUI tool
5
6 Summary:        A source code converter to HTML, XHTML, RTF, TeX, LaTeX, XSL-FO, and XML
7 Summary(pl.UTF-8):      Konwerter kodu źródłowego do formatów HTML, XHTML, RTF, TeX, LaTeX, XSL-FO oraz XML
8 Name:           highlight
9 Version:        4.4
10 Release:        1
11 License:        GPL v3
12 Group:          Applications/Publishing
13 Source0:        http://www.andre-simon.de/zip/%{name}-%{version}.tar.bz2
14 # Source0-md5:  e61056f9cfe5f865ea7f87c74f05d22f
15 Patch0:         %{name}-Makefile.patch
16 URL:            http://www.andre-simon.de/
17 BuildRequires:  boost-devel
18 %{?with_apidocs:BuildRequires:  doxygen}
19 BuildRequires:  libstdc++-devel
20 BuildRequires:  lua-devel >= 5.3
21 BuildRequires:  pkgconfig
22 BuildRequires:  rpm-build >= 4.6
23 BuildRequires:  rpmbuild(macros) >= 1.752
24 %if %{with gui}
25 BuildRequires:  Qt5Core-devel
26 BuildRequires:  Qt5Gui-devel
27 BuildRequires:  Qt5Widgets-devel
28 BuildRequires:  qt5-build
29 BuildRequires:  qt5-qmake
30 %endif
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %define         _sysconfdir     /etc/highlight
34
35 %description
36 Highlight is a universal converter from source code to HTML, XHTML,
37 RTF, TeX, LaTeX, XSL-FO, and XML. (X)HTML output is formatted by
38 Cascading Style Sheets. It supports 100 programming languages and
39 includes 50 highlighting color themes. It's possible to easily enhance
40 the parsing database. The converter includes some features to provide
41 a consistent layout of the input code.
42
43 %description -l pl.UTF-8
44 Highlight jest uniwersalnym konwerterem kodu źródłowego do formatów
45 HTML, XHTML, RTF, TeX, LaTeX, XSL-FO, and XML. Wyjście (X)HTML jest
46 formatowane przez kaskadowe arkusze stylów (CSS). Highlight wspiera
47 100 języków programowania i zawiera 50 kolorystycznych motywów
48 podświetlania składni. Umożliwia łatwe ulepszanie bazy parsowania.
49 Konwerter zawiera pewne cechy zapewniające spójny układ graficzny kodu
50 wejściowego.
51
52 %package apidocs
53 Summary:        API documentation for highlight - a source code converter to HTML, XHTML, RTF, TeX, LaTeX, XSL-FO, and XML
54 Summary(pl.UTF-8):      Dokumentacja API highlight - konwertera kodu źródłowego do HTML, XHTML, RTF, TeX, LaTeX, XSL-FO oraz XML
55 Group:          Documentation
56 BuildArch:      noarch
57
58 %description apidocs
59 API documentation for highlight - a source code converter to HTML,
60 XHTML, RTF, TeX, LaTeX, XSL-FO, and XML.
61
62 %description apidocs -l pl.UTF-8
63 Dokumentacja API highlight - konwertera kodu źródłowego do formatu
64 HTML, XHTML, RTF, TeX, LaTeX, XSL-FO oraz XML.
65
66 %package gui
67 Summary:        GUI for highlight - a source code converter to HTML, XHTML, RTF, TeX, LaTeX, XSL-FO, and XML
68 Summary(pl.UTF-8):      GUI do highlight - konwertera kodu źródłowego do HTML, XHTML, RTF, TeX, LaTeX, XSL-FO oraz XML
69 Group:          Development/Tools
70 Requires:       %{name}
71 Requires(post,postun):  gtk-update-icon-cache
72 Requires:       hicolor-icon-theme
73
74 %description gui
75 Qt4 GUI for for highlight - a source code converter to HTML, XHTML,
76 RTF, TeX, LaTeX, XSL-FO, and XML.
77
78 %package -n bash-completion-highlight
79 Summary:        Bash completion for highlight
80 Group:          Applications/Shells
81 Requires:       %{name} = %{version}-%{release}
82 Requires:       bash-completion >= 1:2.0
83 BuildArch:      noarch
84
85 %description -n bash-completion-highlight
86 Bash completion for highlight.
87
88 %package -n fish-completion-highlight
89 Summary:        fish-completion for highlight
90 Group:          Applications/Shells
91 Requires:       %{name} = %{version}-%{release}
92 Requires:       fish
93 BuildArch:      noarch
94
95 %description -n fish-completion-highlight
96 fish-completion for highlight.
97
98 %package -n zsh-completion-highlight
99 Summary:        ZSH completion for highlight
100 Group:          Applications/Shells
101 Requires:       %{name} = %{version}-%{release}
102 Requires:       zsh
103 BuildArch:      noarch
104
105 %description -n zsh-completion-highlight
106 ZSH completion for highlight.
107
108 %prep
109 %setup -q
110 %patch0 -p1
111
112 %build
113 %{__make} \
114         CXX="%{__cxx}" \
115         CXXFLAGS="%{rpmcxxflags} -std=c++11" \
116         LUA_PKG_NAME="lua"
117 %if %{with gui}
118 %{__make} gui \
119         QMAKE=qmake-qt5 \
120         CXX="%{__cxx}"
121 %endif
122
123 %{?with_apidocs:%{__make} apidocs}
124
125 %install
126 rm -rf $RPM_BUILD_ROOT
127
128 %{__make} install \
129         DESTDIR=$RPM_BUILD_ROOT
130
131 %if %{with gui}
132 %{__make} install-gui \
133         DESTDIR=$RPM_BUILD_ROOT
134 %endif
135
136 # to avoid false `warning: Installed (but unpackaged) file(s) found:' - these files are packaged through %doc
137 rm -fr $RPM_BUILD_ROOT%{_docdir}/highlight
138
139 %clean
140 rm -rf $RPM_BUILD_ROOT
141
142 %post gui
143 %update_icon_cache hicolor
144
145 %postun gui
146 %update_icon_cache hicolor
147
148 %files
149 %defattr(644,root,root,755)
150 %doc AUTHORS ChangeLog.adoc README.adoc README_LANGLIST.adoc README_PLUGINS.adoc README_REGEX.adoc extras
151 %lang(de) %doc README_DE.adoc
152 %attr(755,root,root) %{_bindir}/%{name}
153 %dir %{_datadir}/%{name}
154 %{_datadir}/%{name}/langDefs
155 %dir %{_datadir}/%{name}/plugins
156 %{_datadir}/%{name}/plugins/*.lua
157 %{_datadir}/%{name}/themes
158 %{_mandir}/man1/highlight.1*
159 %{_mandir}/man5/filetypes.conf.5*
160 %dir %{_sysconfdir}
161 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
162
163 %if %{with apidocs}
164 %files apidocs
165 %defattr(644,root,root,755)
166 %doc apidocs/html/*
167 %endif
168
169 %if %{with gui}
170 %files gui
171 %defattr(644,root,root,755)
172 %attr(755,root,root) %{_bindir}/%{name}-gui
173 %dir %{_datadir}/%{name}/gui_files
174 %dir %{_datadir}/%{name}/gui_files/l10n
175 %lang(bg) %{_datadir}/%{name}/gui_files/l10n/highlight_bg_BG.qm
176 %lang(cs) %{_datadir}/%{name}/gui_files/l10n/highlight_cs_CZ.qm
177 %lang(de) %{_datadir}/%{name}/gui_files/l10n/highlight_de_DE.qm
178 %lang(es) %{_datadir}/%{name}/gui_files/l10n/highlight_es_ES.qm
179 %lang(fr) %{_datadir}/%{name}/gui_files/l10n/highlight_fr_FR.qm
180 %lang(it) %{_datadir}/%{name}/gui_files/l10n/highlight_it_IT.qm
181 %lang(ja) %{_datadir}/%{name}/gui_files/l10n/highlight_ja_JP.qm
182 %lang(zh) %{_datadir}/%{name}/gui_files/l10n/highlight_zh_CN.qm
183 %{_datadir}/%{name}/gui_files/ext
184 %{_desktopdir}/*.desktop
185 %{_iconsdir}/hicolor/*x*/apps/highlight.png
186 %endif
187
188 %files -n bash-completion-highlight
189 %defattr(644,root,root,755)
190 %{bash_compdir}/highlight
191
192 %files -n fish-completion-highlight
193 %defattr(644,root,root,755)
194 %{fish_compdir}/highlight.fish
195
196 %files -n zsh-completion-highlight
197 %defattr(644,root,root,755)
198 %{zsh_compdir}/_highlight
This page took 0.093838 seconds and 3 git commands to generate.