-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathformast.spec.in
85 lines (66 loc) · 2.25 KB
/
formast.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Name: formast
Version: @VERSION@
Release: 1%{?dist}
Summary: Expose file format descriptions through a simple API
License: BSD
URL: https://github.com/amorilia/formast
Source0: formast-%{version}-Source.zip
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: java-devel
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: swig
%description
FormAST stands for file format abstract syntax tree.
Its primary purpose is to expose the abstract syntax tree
of a file format description.
%package devel
Summary: Development headers for formast
Requires: formast = %{version}-%{release}
Requires: boost-devel
%description devel
This package contains the development headers for formast.
%package -n python-formast
Summary: Python 2 bindings for formast
Requires: formast = %{version}-%{release}
%description -n python-formast
This package contains Python 2 bindings for formast.
%package -n python3-formast
Summary: Python 3 bindings for formast
Requires: formast = %{version}-%{release}
%description -n python3-formast
This package contains Python 3 bindings for formast.
%prep
%setup -q -n formast-%{version}-Source
%build
%cmake . -DBUILD_PYTHON_PACKAGE=OFF -DBUILD_STATIC_LIBRARY=OFF
make %{?_smp_mflags}
pushd src/formast/swig/python/package_system
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
%install
rm -rf $RPM_BUILD_ROOT
%make_install
pushd src/formast/swig/python/package_system
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc README.rst LICENSE.rst TODO.rst AUTHORS.rst CHANGELOG.rst
%{_bindir}/formast
%{_libdir}/libformast.so
%files devel
%{_includedir}/formast.hpp
%files -n python-formast
%{python_sitearch}/formast
%{python_sitearch}/formast-%{version}-py*.egg-info
%files -n python3-formast
%{python3_sitearch}/formast
%{python3_sitearch}/formast-%{version}-py*.egg-info
%changelog
* Sun Nov 18 2012 Amorilia <[email protected]>
- Initial release.