source: rtems-source-builder/source-builder/config/protobuf-2-1.cfg @ 80cf137

4.11
Last change on this file since 80cf137 was 8a7428c, checked in by Chris Johns <chrisj@…>, on 01/23/15 at 03:33:19

Add Google Protocol Buffers as a 3prd party package for RTEMS.

https://developers.google.com/protocol-buffers/

  • Property mode set to 100644
File size: 1.6 KB
Line 
1#
2# Google Protocol Buffers 2.x.x Version 1.
3#
4# This configuration file configure's, make's and install's Protocol Buffers
5#
6
7%if %{release} == %{nil}
8%define release 1
9%endif
10
11Name:      protobuf-%{protobuf_version}-%{_host}-%{release}
12Summary:   Protocol buffers are Googles language-neutral,
13           platform-neutral, extensible mechanism for serializing
14           structured data.
15Version:   %{protobuf_version}
16Release:   %{release}
17URL:       https://developers.google.com/protocol-buffers/
18BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
19
20#
21# Protocol Buffers Source
22#
23%source set protobuf https://github.com/google/protobuf/releases/download/v%{protobuf_version}/protobuf-%{protobuf_version}.tar.gz
24
25#
26# Prepare the source code.
27#
28%prep
29  build_top=$(pwd)
30
31  source_dir_protobuf="protobuf-%{protobuf_version}"
32  %source setup protobuf -q -n protobuf-%{protobuf_version}
33  %patch setup protobuf -p1
34
35  cd ${build_top}
36
37%build
38  build_top=$(pwd)
39
40  %{build_directory}
41
42  mkdir -p ${build_dir}
43  cd ${build_dir}
44
45  %define host_cxxflags %{host_cxxflags} -fpermissive
46
47  %{host_build_flags}
48
49  ../${source_dir_protobuf}/configure \
50    --host=%{_host} \
51    --prefix=%{_prefix} \
52    --bindir=%{_bindir} \
53    --exec_prefix=%{_exec_prefix} \
54    --includedir=%{_includedir} \
55    --libdir=%{_libdir} \
56    --libexecdir=%{_libexecdir} \
57    --mandir=%{_mandir} \
58    --infodir=%{_infodir} \
59    --datadir=%{_datadir} \
60    --with-protoc=true
61
62  %{__make} %{?_smp_mflags} all
63
64  cd ${build_top}
65
66%install
67  build_top=$(pwd)
68
69  %{__rmdir} $SB_BUILD_ROOT
70
71  cd ${build_dir}
72  %{__make} DESTDIR=$SB_BUILD_ROOT install
73  cd ${build_top}
Note: See TracBrowser for help on using the repository browser.