]> git.pld-linux.org Git - packages/highlight.git/blob - highlight.spec
b977520c6c15b5753d99a96e2d561db3b3c3aa99
[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.2
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:  bb325c237ed1175e23acac55f2106a7c
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 %prep
79 %setup -q
80 %patch0 -p1
81
82 %build
83 %{__make} \
84         CXX="%{__cxx}" \
85         CXXFLAGS="%{rpmcxxflags} -std=c++11" \
86         LUA_PKG_NAME="lua"
87 %if %{with gui}
88 %{__make} gui \
89         QMAKE=qmake-qt5 \
90         CXX="%{__cxx}"
91 %endif
92
93 %{?with_apidocs:%{__make} apidocs}
94
95 %install
96 rm -rf $RPM_BUILD_ROOT
97
98 %{__make} install \
99         DESTDIR=$RPM_BUILD_ROOT
100
101 %if %{with gui}
102 %{__make} install-gui \
103         DESTDIR=$RPM_BUILD_ROOT
104 %endif
105
106 # to avoid false `warning: Installed (but unpackaged) file(s) found:' - these files are packaged through %doc
107 rm -fr $RPM_BUILD_ROOT%{_docdir}/highlight
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %post gui
113 %update_icon_cache hicolor
114
115 %postun gui
116 %update_icon_cache hicolor
117
118 %files
119 %defattr(644,root,root,755)
120 %doc AUTHORS ChangeLog.adoc README.adoc README_LANGLIST.adoc README_PLUGINS.adoc README_REGEX.adoc extras
121 %lang(de) %doc README_DE.adoc
122 %attr(755,root,root) %{_bindir}/%{name}
123 %dir %{_datadir}/%{name}
124 %{_datadir}/%{name}/langDefs
125 %dir %{_datadir}/%{name}/plugins
126 %{_datadir}/%{name}/plugins/*.lua
127 %{_datadir}/%{name}/themes
128 %{_mandir}/man1/highlight.1*
129 %{_mandir}/man5/filetypes.conf.5*
130 %dir %{_sysconfdir}
131 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
132
133 %if %{with apidocs}
134 %files apidocs
135 %defattr(644,root,root,755)
136 %doc apidocs/html/*
137 %endif
138
139 %if %{with gui}
140 %files gui
141 %defattr(644,root,root,755)
142 %attr(755,root,root) %{_bindir}/%{name}-gui
143 %dir %{_datadir}/%{name}/gui_files
144 %dir %{_datadir}/%{name}/gui_files/l10n
145 %lang(bg) %{_datadir}/%{name}/gui_files/l10n/highlight_bg_BG.qm
146 %lang(cs) %{_datadir}/%{name}/gui_files/l10n/highlight_cs_CZ.qm
147 %lang(de) %{_datadir}/%{name}/gui_files/l10n/highlight_de_DE.qm
148 %lang(es) %{_datadir}/%{name}/gui_files/l10n/highlight_es_ES.qm
149 %lang(fr) %{_datadir}/%{name}/gui_files/l10n/highlight_fr_FR.qm
150 %lang(it) %{_datadir}/%{name}/gui_files/l10n/highlight_it_IT.qm
151 %lang(zh) %{_datadir}/%{name}/gui_files/l10n/highlight_zh_CN.qm
152 %{_datadir}/%{name}/gui_files/ext
153 %{_desktopdir}/*.desktop
154 %{_iconsdir}/hicolor/*x*/apps/highlight.png
155 %endif
This page took 0.06961 seconds and 2 git commands to generate.