-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
packaging: added rpm spec file #513
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
To build RPM package need to execute | ||
```sh | ||
mkdir -p ~/rpmbuild/SOURCES | ||
rpmbuild --undefine=_disable_source_fetch -ba libnats.spec | ||
``` | ||
|
||
If you need specific package version, please edit "Version" value inside spec file. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
%global source_name nats.c | ||
%define debug_package %{nil} | ||
|
||
Name: libnats | ||
Version: 3.1.1 | ||
Release: 1%{?dist} | ||
Summary: NATS & NATS Streaming - C Client | ||
License: ASL 2.0 | ||
URL: https://github.com/nats-io/nats.c | ||
Source0: https://github.com/nats-io/nats.c/archive/v%{version}/%{source_name}-v%{version}.tar.gz | ||
Requires: openssl-libs | ||
BuildRequires: cmake | ||
BuildRequires: openssl-devel | ||
BuildRequires: protobuf-c-devel | ||
|
||
%description | ||
A C client for the NATS messaging system. | ||
Go here for the online documentation, and check the frequently asked questions. | ||
This NATS Client implementation is heavily based on the NATS GO Client. | ||
There is support for Mac OS/X, Linux and Windows (although we don't have specific platform support matrix). | ||
|
||
%package devel | ||
Summary: Development files for %{name} | ||
Requires: %{name}%{?_isa} = %{version}-%{release} | ||
|
||
%description devel | ||
The %{name}-devel package contains libraries and header files for | ||
developing applications that use %{source_name}. | ||
|
||
%prep | ||
%setup -q -n %{source_name}-%{version} | ||
|
||
%build | ||
%{cmake} | ||
%{cmake_build} -j 1 | ||
|
||
%install | ||
%{cmake_install} | ||
find %{buildroot} -name '*.a' -delete | ||
|
||
%files | ||
%{_libdir}/%{name}.so* | ||
|
||
%files devel | ||
%dir %{_includedir}/nats | ||
%dir %{_includedir}/nats/adapters | ||
%{_includedir}/nats.h | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that we don't install nats.h in the root of include directory, instead it is installed under |
||
%{_includedir}/nats/*.h | ||
%{_includedir}/nats/adapters/*.h | ||
%{_libdir}/pkgconfig/%{name}.pc | ||
%{_prefix}/lib/cmake/cnats/*.cmake | ||
|
||
%changelog | ||
* Sat Nov 06 2021 Sergey Safarov <s.safarov@gmail.com> 3.1.1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe refresh the date here and change the version? |
||
- initial packaging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are currently at version 3.2.0. Also, would be nice if that could be updated when generating version, otherwise it will need to be manually updated before I do a new release..