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

Add RPM spec file template #109

Open
wants to merge 2 commits into
base: master
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
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,15 @@ set(CPACK_PACKAGE_HOMEPAGE_URL "${REPLXX_URL_INFO_ABOUT}")
set(CPACK_PACKAGE_VENDOR "codestation.org")
set(CPACK_PACKAGE_CONTACT "amok@codestation.org")
set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
set(CPACK_PACKAGE_RELEASE "1")

set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")

set(CPACK_STRIP_FILES "ON")

set(CPACK_DEBIAN_PACKAGE_SECTION "utilities")

configure_file("${CMAKE_CURRENT_SOURCE_DIR}/replxx.spec.in" "${CMAKE_CURRENT_SOURCE_DIR}/replxx.spec" @ONLY IMMEDIATE)
set(CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_BINARY_DIR}/replxx.spec")


55 changes: 55 additions & 0 deletions replxx.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Name: replxx
Version: 0.0.4
Release: 1%{?dist}
Summary: Readline and libedit replacement library

Group: System Environment/Libraries
License: BSD
URL: https://github.com/AmokHuginnsson/replxx
Source0: https://github.com/AmokHuginnsson/replxx/archive/refs/tags/%{name}-%{version}.tar.gz

BuildRequires: cmake
BuildRequires: gcc

%description
A small, portable GNU readline replacement for Linux, Windows and
MacOS which is capable of handling UTF-8 characters. Unlike GNU
readline, which is GPL, this library uses a BSD license and can be
used in any kind of program.

%package devel
Summary: Development files for replxx
Requires: %{name}%{?_isa} = %{version}-%{release}

%description devel
Header files for the replxx library.

%prep
%setup -q


%build
%cmake .
%make_build


%install
%make_install


%check
ctest -V %{?_smp_mflags}

%files
%license LICENSE.md
%{_libdir}/*.so
%{_libdir}/*.so.*

%files devel
%doc README.md
%{_includedir}/*.h
%{_includedir}/*.hxx
%{_datadir}/cmake/%{name}/*.cmake

%changelog

55 changes: 55 additions & 0 deletions replxx.spec.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Name: replxx
Version: @CPACK_PACKAGE_VERSION@
Release: @CPACK_PACKAGE_RELEASE@%{?dist}
Summary: Readline and libedit replacement library

Group: System Environment/Libraries
License: BSD
URL: https://github.com/AmokHuginnsson/replxx
Source0: https://github.com/AmokHuginnsson/replxx/archive/refs/tags/%{name}-%{version}.tar.gz

BuildRequires: cmake
BuildRequires: gcc

%description
A small, portable GNU readline replacement for Linux, Windows and
MacOS which is capable of handling UTF-8 characters. Unlike GNU
readline, which is GPL, this library uses a BSD license and can be
used in any kind of program.

%package devel
Summary: Development files for replxx
Requires: %{name}%{?_isa} = %{version}-%{release}

%description devel
Header files for the replxx library.

%prep
%setup -q


%build
%cmake .
%make_build


%install
%make_install


%check
ctest -V %{?_smp_mflags}

%files
%license LICENSE.md
%{_libdir}/*.so
%{_libdir}/*.so.*

%files devel
%doc README.md
%{_includedir}/*.h
%{_includedir}/*.hxx
%{_datadir}/cmake/%{name}/*.cmake

%changelog