initial package build
This commit is contained in:
parent
673135eb0f
commit
7d00639184
4 changed files with 68 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/afetch-2.2.0.tar.gz
|
||||
44
afetch.spec
Normal file
44
afetch.spec
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
Name: afetch
|
||||
Version: 2.2.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Simple system info written in C
|
||||
|
||||
License: GPL-3.0-only
|
||||
URL: https://github.com/13-CF/afetch
|
||||
Source0: %{url}/archive/V%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: gcc
|
||||
|
||||
# https://github.com/13-CF/afetch/pull/94
|
||||
Patch: use_our_build_flags.patch
|
||||
|
||||
%description
|
||||
Fast and simple system info (for UNIX based operating systems)
|
||||
written in POSIX compliant C99
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup
|
||||
|
||||
|
||||
%build
|
||||
%if 0%{?rhel}
|
||||
%set_build_flags
|
||||
%endif
|
||||
%make_build
|
||||
|
||||
|
||||
%install
|
||||
%make_install PREFIX=%{_prefix}
|
||||
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%{_bindir}/%{name}
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Aug 16 2022 Jonathan Wright <jonathan@almalinux.org> - 2.2.0-1
|
||||
- Initial package build
|
||||
- rhbz#2118837
|
||||
1
sources
Normal file
1
sources
Normal file
|
|
@ -0,0 +1 @@
|
|||
SHA512 (afetch-2.2.0.tar.gz) = 90503f197b454e2edd8d11db3246c57f975b962c639bddc73563c12c5bf63448c4de5b24c550459a3a75cbddb1812a2999363de347c9b970b8eb4d7cd305375c
|
||||
22
use_our_build_flags.patch
Normal file
22
use_our_build_flags.patch
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
diff -uNr afetch-2.2.0.orig/Makefile afetch-2.2.0/Makefile
|
||||
--- afetch-2.2.0.orig/Makefile 2022-08-16 17:35:01.096325284 -0500
|
||||
+++ afetch-2.2.0/Makefile 2022-08-16 17:40:44.463548894 -0500
|
||||
@@ -1,7 +1,7 @@
|
||||
SRC = src/fetch.c
|
||||
CC ?= cc
|
||||
-CFLAGS = -O2 -std=c99 -Wall -Wextra
|
||||
-LDFLAGS = -lpthread
|
||||
+CFLAGS += -O2 -std=c99 -Wall -Wextra
|
||||
+LDFLAGS += -lpthread
|
||||
DEBUGFLAGS = -g -Og -std=c99 -Wall -Wextra
|
||||
PREFIX ?= /usr/local
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
install: afetch
|
||||
mkdir -p ${DESTDIR}${PREFIX}/bin
|
||||
cp afetch ${DESTDIR}${PREFIX}/bin
|
||||
- chmod 711 ${DESTDIR}${PREFIX}/bin/afetch
|
||||
+ chmod 755 ${DESTDIR}${PREFIX}/bin/afetch
|
||||
|
||||
uninstall:
|
||||
rm -f ${DESTDIR}${PREFIX}/bin/afetch
|
||||
Loading…
Add table
Add a link
Reference in a new issue