diff --git a/CMakeLists.txt b/CMakeLists.txt index fd71afe..61684fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -211,6 +211,7 @@ 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") @@ -218,3 +219,7 @@ 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") + + diff --git a/replxx.spec b/replxx.spec new file mode 100644 index 0000000..a1d3e06 --- /dev/null +++ b/replxx.spec @@ -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 + diff --git a/replxx.spec.in b/replxx.spec.in new file mode 100644 index 0000000..1927983 --- /dev/null +++ b/replxx.spec.in @@ -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 +