Skip to content
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

Added raft.spec.in for rpmbuild #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ config.log
config.status
libtool
raft.pc
raft.spec
stamp-h1
*.lo
*.la
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -165,5 +165,5 @@ AS_IF(test "x$enable_lz4" != "xno" -a "x$have_lz4" = "xyes", REQUIRES=liblz4)
AS_IF(test "$have_uv" = yes, REQUIRES="$REQUIRES libuv")
AC_SUBST(REQUIRES)

AC_CONFIG_FILES([raft.pc Makefile])
AC_CONFIG_FILES([raft.pc raft.spec Makefile])
AC_OUTPUT
58 changes: 58 additions & 0 deletions raft.spec.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
Name: raft
Epoch: 1
Version: @PACKAGE_VERSION@
Release: 1
Summary: C implementation of the Raft Consensus protocol

# from README.md
License: Slightly modified version of LGPLv3 with allowance for users to link statically
URL: https://raft.readthedocs.io/

Source0: https://github.com/cowsql/%{name}/archive/refs/tags/v%{version}.tar.gz

Requires: libuv lz4
BuildRequires: autoconf automake libtool gcc libuv-devel lz4-devel

%description
Raft is a fully asynchronous C implementation of the Raft consensus protocol.

%package devel
Summary: Development libraries for raft
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
Provides: %{name}-static

%description devel
Development libraries for raft

%package_help


%prep
%autosetup -p1 -n %{name}-%{version}

%build
autoreconf -i
%configure
%make_build

%install
%make_install
%delete_la

%check
%ldconfig_scriptlets

%files
%license LICENSE
%{_libdir}/lib%{name}.so*

%files devel
%{_libdir}/lib%{name}.a
%{_libdir}/pkgconfig/%{name}.pc
%{_includedir}/raft.h
%{_includedir}/raft/uv.h
%{_includedir}/raft/fixture.h

%files help
%doc README.md AUTHORS