Skip to content

Commit e6e3c59

Browse files
authored
CPP-766 - Allow RPM packages to be built on Amazon Linux (#230)
1 parent dd69942 commit e6e3c59

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

cpp-driver/packaging/cassandra-cpp-driver.spec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
%if 0%{!?amzn}
12
%define distnum %(/usr/lib/rpm/redhat/dist.sh --distnum)
3+
%endif
24

35
Name: cassandra-cpp-driver
46
Epoch: 1
@@ -14,9 +16,11 @@ Source1: cassandra.pc.in
1416
Source2: cassandra_static.pc.in
1517

1618
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
19+
%if 0%{?distnum}
1720
%if %{distnum} == 5
1821
BuildRequires: buildsys-macros >= 5
1922
%endif
23+
%endif
2024
BuildRequires: cmake >= 2.6.4
2125
BuildRequires: libuv-devel >= %{libuv_version}
2226
BuildRequires: openssl-devel >= 0.9.8e

packaging/dse-cpp-driver.spec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
%if 0%{!?amzn}
12
%define distnum %(/usr/lib/rpm/redhat/dist.sh --distnum)
3+
%endif
24

35
Name: dse-cpp-driver
46
Epoch: 1
@@ -14,9 +16,11 @@ Source1: dse.pc.in
1416
Source2: dse_static.pc.in
1517

1618
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
19+
%if 0%{?distnum}
1720
%if %{distnum} == 5
1821
BuildRequires: buildsys-macros >= 5
1922
%endif
23+
%endif
2024
BuildRequires: cmake >= 2.6.4
2125
BuildRequires: libuv-devel >= %{libuv_version}
2226
BuildRequires: openssl-devel >= 0.9.8e

0 commit comments

Comments
 (0)