-
Notifications
You must be signed in to change notification settings - Fork 0
/
libacars.spec
87 lines (71 loc) · 2.41 KB
/
libacars.spec
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
85
86
87
%global optflags %{optflags} -flto=auto
%global build_ldflags %{build_ldflags} -flto
Name: libacars
Version: 1.3.1
Release: 1%{?dist}
Summary: A library for decoding various ACARS message payloads
License: MIT
URL: https://github.com/szpajder/libacars
Source0: https://github.com/szpajder/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig(zlib)
BuildRequires: ninja-build
%description
libacars is a library for decoding various ACARS message payloads.
%package devel
Summary: Development files for libacars
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
libacars is a library for decoding various ACARS message payloads.
This subpackage contains libraries and header files for developing
applications that want to make use of libacars.
%package -n acars-examples
Summary: Example applications for libacars
%description -n acars-examples
Example applications for for libacars:
* decode_arinc.c - decodes ARINC-622 messages supplied at the
command line or from a file.
* adsc_get_position - illustrates how to extract position-related
fields from decoded ADS-C message.
* cpdlc_get_position - illustrates how to extract position-related
fields from CPDLC position reports.
* media_advisory - decodes Media Advisory messages (ACARS label SA
reports)
%prep
%autosetup
mkdir -p %{_target_platform}
# Remove static lib build
sed -i -e "/acars_static/d" src/libacars/CMakeLists.txt
%build
pushd %{_target_platform}
%cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_AR=/usr/bin/gcc-ar \
-DCMAKE_RANLIB=/usr/bin/gcc-ranlib \
-DCMAKE_NM=/usr/bin/gcc-nm \
-DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \
-DCMAKE_SHARED_LINKER_FLAGS="" \
..
popd
%ninja_build -C %{_target_platform}
%install
%ninja_install -C %{_target_platform}
rm -rf %{buildroot}/%{_datadir}/doc
%files
%doc CHANGELOG.md README.md
%license LICENSE.md
%{_libdir}/%{name}.so.1
%files devel
%doc doc/API_REFERENCE.md doc/API_REFERENCE.md
%{_includedir}/%{name}
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%files -n acars-examples
%{_bindir}/adsc_get_position
%{_bindir}/cpdlc_get_position
%{_bindir}/decode_acars_apps
%{_bindir}/media_advisory
%changelog
* Thu Oct 24 2019 Vasiliy N. Glazov <[email protected]> - 1.3.1-1
- Initial release for Fedora