]> git.pld-linux.org Git - packages/vislcg3.git/blame_incremental - vislcg3.spec
- icu 67 rebuild
[packages/vislcg3.git] / vislcg3.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without python # Python(3) binding
4%bcond_without static_libs # static library
5
6Summary: VISL CG-3 constraint grammar system
7Summary(pl.UTF-8): VISL CG-3 - system ograniczonej gramatyki
8Name: vislcg3
9Version: 1.3.1
10Release: 2
11License: GPL v3+
12Group: Applications/Text
13#Source0Download: https://github.com/TinoDidriksen/cg3/releases
14Source0: https://github.com/TinoDidriksen/cg3/archive/v%{version}/cg3-%{version}.tar.gz
15# Source0-md5: a5b608f4ee7e5d7427b360ef22d58348
16Patch0: %{name}-static.patch
17URL: http://beta.visl.sdu.dk/cg3.html
18BuildRequires: cmake >= 3.0
19BuildRequires: boost-devel >= 1.63.0-4
20BuildRequires: libicu-devel >= 50.0
21# -std=c++14
22BuildRequires: libstdc++-devel >= 6:5.0
23BuildRequires: rpmbuild(macros) >= 1.714
24BuildRequires: sed >= 4.0
25%if %{with python}
26BuildRequires: python3-devel >= 1:3.5
27BuildRequires: swig-python >= 3.0
28%endif
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
32VISL CG-3 constraint grammar system.
33
34%description -l pl.UTF-8
35VISL CG-3 - system ograniczonej gramatyki.
36
37%package devel
38Summary: Header file for VISL CG-3 library
39Summary(pl.UTF-8): Plik nagłówkowy biblioteki VISL CG-3
40Group: Development/Libraries
41Requires: %{name} = %{version}-%{release}
42
43%description devel
44Header file for VISL CG-3 library.
45
46%description devel -l pl.UTF-8
47Plik nagłówkowy biblioteki VISL CG-3.
48
49%package static
50Summary: Static VISL CG-3 library
51Summary(pl.UTF-8): Statyczna biblioteka VISL CG-3
52Group: Development/Libraries
53Requires: %{name}-devel = %{version}-%{release}
54
55%description static
56Static VISL CG-3 library.
57
58%description static -l pl.UTF-8
59Statyczna biblioteka VISL CG-3.
60
61%package -n python3-constraint_grammar
62Summary: Python 3 bindings for CG-3 library
63Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki CG-3
64Group: Libraries/Python
65Requires: %{name} = %{version}-%{release}
66Requires: python3-libs >= 1:3.5
67
68%description -n python3-constraint_grammar
69Python 3 bindings for CG-3 library.
70
71%description -n python3-constraint_grammar -l pl.UTF-8
72Wiązania Pythona 3 do biblioteki CG-3.
73
74%package -n emacs-cg-mode
75Summary: CG-3 mode for Emacs
76Summary(pl.UTF-8): Tryb CG-3 dla Emacsa
77Group: Applications/Editors/Emacs
78Requires: emacs-common
79%if "%{_rpmversion}" >= "5"
80BuildArch: noarch
81%endif
82
83%description -n emacs-cg-mode
84CG-3 mode for Emacs.
85
86%description -n emacs-cg-mode -l pl.UTF-8
87Tryb CG-3 dla Emacsa.
88
89%prep
90%setup -q -n cg3-%{version}
91%patch0 -p1
92
93# not executable
94%{__sed} -i -e '1s,.*/usr/bin/env perl,,' scripts/CG3_External.pm
95# invoke directly
96%{__sed} -i -e '1s,/usr/bin/env perl,%{__perl},' scripts/{cg-sort,cg-strictify,cg-untrace,cg3-autobin.pl.in}
97
98%build
99# it expectls only relative CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_INCLUDEDIR (see cg.pc)
100%if %{with static_libs}
101install -d build-static
102cd build-static
103%cmake .. \
104 -DBUILD_SHARED_LIBS=OFF \
105 -DCMAKE_INSTALL_INCLUDEDIR=include \
106 -DCMAKE_INSTALL_LIBDIR=%{_lib} \
107 -DUSE_TCMALLOC=OFF
108
109%{__make}
110cd ..
111%endif
112
113install -d build
114cd build
115%cmake .. \
116 -DCMAKE_INSTALL_INCLUDEDIR=include \
117 -DCMAKE_INSTALL_LIBDIR=%{_lib} \
118 %{?with_python:-DENABLE_PYTHON_BINDINGS=ON} \
119 -DPYTHON_INSTALL_PARAMS="--prefix=%{_prefix} --root=$RPM_BUILD_ROOT --optimize=2" \
120 -DUSE_TCMALLOC=OFF
121
122%{__make}
123
124%install
125rm -rf $RPM_BUILD_ROOT
126
127%if %{with static_libs}
128%{__make} -C build-static/src install \
129 DESTDIR=$RPM_BUILD_ROOT
130%endif
131
132%{__make} -C build install \
133 DESTDIR=$RPM_BUILD_ROOT
134
135%clean
136rm -rf $RPM_BUILD_ROOT
137
138%post -p /sbin/ldconfig
139%postun -p /sbin/ldconfig
140
141%files
142%defattr(644,root,root,755)
143%doc AUTHORS ChangeLog README.md TODO
144%attr(755,root,root) %{_bindir}/cg-comp
145%attr(755,root,root) %{_bindir}/cg-conv
146%attr(755,root,root) %{_bindir}/cg-mwesplit
147%attr(755,root,root) %{_bindir}/cg-proc
148%attr(755,root,root) %{_bindir}/cg-relabel
149%attr(755,root,root) %{_bindir}/cg-sort
150%attr(755,root,root) %{_bindir}/cg-strictify
151%attr(755,root,root) %{_bindir}/cg-untrace
152%attr(755,root,root) %{_bindir}/cg3-autobin.pl
153%attr(755,root,root) %{_bindir}/vislcg3
154%attr(755,root,root) %{_libdir}/libcg3.so.1
155%{_mandir}/man1/cg-comp.1*
156%{_mandir}/man1/cg-conv.1*
157%{_mandir}/man1/cg-proc.1*
158%{_mandir}/man1/cg3-autobin.pl.1*
159%{_mandir}/man1/vislcg3.1*
160
161%files devel
162%defattr(644,root,root,755)
163%attr(755,root,root) %{_libdir}/libcg3.so
164%{_includedir}/cg3.h
165%{_pkgconfigdir}/cg3.pc
166
167%if %{with static_libs}
168%files static
169%defattr(644,root,root,755)
170%{_libdir}/libcg3.a
171%endif
172
173%if %{with python}
174%files -n python3-constraint_grammar
175%defattr(644,root,root,755)
176%attr(755,root,root) %{py3_sitedir}/_constraint_grammar.cpython-*.so
177%{py3_sitedir}/cg3.py
178%{py3_sitedir}/constraint_grammar.py
179%{py3_sitedir}/__pycache__/cg3.cpython-*.py[co]
180%{py3_sitedir}/__pycache__/constraint_grammar.cpython-*.py[co]
181%{py3_sitedir}/constraint_grammar-%{version}.*-py*.egg-info
182%endif
183
184%files -n emacs-cg-mode
185%defattr(644,root,root,755)
186%{_datadir}/emacs/site-lisp/cg.el
This page took 0.034826 seconds and 4 git commands to generate.