Prepair for v1.0.1
This commit is contained in:
parent
445b6dcf26
commit
0c6927220f
7
Makefile
7
Makefile
@ -2,6 +2,7 @@
|
|||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -Wall -Wextra -O2
|
CFLAGS = -Wall -Wextra -O2
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
|
VERSION = 1.0.1
|
||||||
|
|
||||||
# Files
|
# Files
|
||||||
PROG = shardz
|
PROG = shardz
|
||||||
@ -17,9 +18,15 @@ $(PROG): $(OBJECTS)
|
|||||||
install: $(PROG)
|
install: $(PROG)
|
||||||
install -d $(DESTDIR)$(PREFIX)/bin
|
install -d $(DESTDIR)$(PREFIX)/bin
|
||||||
install -m 755 $(PROG) $(DESTDIR)$(PREFIX)/bin/$(PROG)
|
install -m 755 $(PROG) $(DESTDIR)$(PREFIX)/bin/$(PROG)
|
||||||
|
install -d $(DESTDIR)$(PREFIX)/lib/pkgconfig
|
||||||
|
install -m 644 shardz.pc $(DESTDIR)$(PREFIX)/lib/pkgconfig/
|
||||||
|
install -d $(DESTDIR)$(PREFIX)/share/man/man1
|
||||||
|
install -m 644 man/shardz.1 $(DESTDIR)$(PREFIX)/share/man/man1/
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROG)
|
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROG)
|
||||||
|
rm -f $(DESTDIR)$(PREFIX)/lib/pkgconfig/shardz.pc
|
||||||
|
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/shardz.1
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(PROG) $(OBJECTS)
|
rm -f $(PROG) $(OBJECTS)
|
||||||
|
35
man/shardz.1
Normal file
35
man/shardz.1
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
.TH SHARDZ 1 "2025" "shardz 1.0.1" "User Commands"
|
||||||
|
.SH NAME
|
||||||
|
shardz \- shard the output of any process for distributed processing
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B some_command
|
||||||
|
.RI "|"
|
||||||
|
.B shardz
|
||||||
|
.I INDEX/TOTAL
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.B shardz
|
||||||
|
is a lightweight utility that shards (splits) the output of any process for distributed processing.
|
||||||
|
It allows you to easily distribute workloads across multiple processes or machines by splitting
|
||||||
|
input streams into evenly distributed chunks.
|
||||||
|
.SH OPTIONS
|
||||||
|
.TP
|
||||||
|
.I INDEX/TOTAL
|
||||||
|
INDEX is the shard number (starting from 1), and TOTAL is the total number of shards.
|
||||||
|
.SH EXAMPLES
|
||||||
|
Machine number 1 would run:
|
||||||
|
.PP
|
||||||
|
.nf
|
||||||
|
curl https://example.com/large_file.txt | shardz 1/3
|
||||||
|
.fi
|
||||||
|
.PP
|
||||||
|
Machine number 2 would run:
|
||||||
|
.PP
|
||||||
|
.nf
|
||||||
|
curl https://example.com/large_file.txt | shardz 2/3
|
||||||
|
.fi
|
||||||
|
.SH AUTHOR
|
||||||
|
Written by acidvegas <acid.vegas@acid.vegas>
|
||||||
|
.SH COPYRIGHT
|
||||||
|
Copyright \(co 2025 acidvegas
|
||||||
|
.br
|
||||||
|
Licensed under the ISC License.
|
23
pkg/arch/PKGBUILD
Normal file
23
pkg/arch/PKGBUILD
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Maintainer: acidvegas <acid.vegas@acid.vegas>
|
||||||
|
|
||||||
|
pkgname=shardz
|
||||||
|
pkgver=1.0.0
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Utility that shards the output of any process for distributed processing"
|
||||||
|
arch=('x86_64' 'i686' 'aarch64' 'armv7h')
|
||||||
|
url="https://github.com/acidvegas/shardz"
|
||||||
|
license=('ISC')
|
||||||
|
depends=('glibc')
|
||||||
|
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
|
||||||
|
sha256sums=('SKIP')
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$pkgname-$pkgver"
|
||||||
|
make
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$pkgname-$pkgver"
|
||||||
|
make DESTDIR="$pkgdir" PREFIX=/usr install
|
||||||
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||||
|
}
|
16
pkg/debian/control
Normal file
16
pkg/debian/control
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
Source: shardz
|
||||||
|
Section: utils
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: acidvegas <acid.vegas@acid.vegas>
|
||||||
|
Build-Depends: debhelper-compat (= 13), gcc, make
|
||||||
|
Standards-Version: 4.5.1
|
||||||
|
Homepage: https://github.com/acidvegas/shardz
|
||||||
|
|
||||||
|
Package: shardz
|
||||||
|
Architecture: any
|
||||||
|
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||||
|
Description: Utility that shards process output for distributed processing
|
||||||
|
Shardz is a lightweight C utility that shards (splits) the output of any
|
||||||
|
process for distributed processing. It allows you to easily distribute
|
||||||
|
workloads across multiple processes or machines by splitting input streams
|
||||||
|
into evenly distributed chunks.
|
7
pkg/debian/rules
Normal file
7
pkg/debian/rules
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@
|
||||||
|
|
||||||
|
override_dh_auto_install:
|
||||||
|
dh_auto_install -- PREFIX=/usr
|
35
pkg/rpm/shardz.spec
Normal file
35
pkg/rpm/shardz.spec
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
Name: shardz
|
||||||
|
Version: 1.0.1
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Summary: Utility that shards the output of any process for distributed processing
|
||||||
|
|
||||||
|
License: ISC
|
||||||
|
URL: https://github.com/acidvegas/shardz
|
||||||
|
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
BuildRequires: gcc
|
||||||
|
BuildRequires: make
|
||||||
|
|
||||||
|
%description
|
||||||
|
Shardz is a lightweight C utility that shards (splits) the output of any process
|
||||||
|
for distributed processing. It allows you to easily distribute workloads across
|
||||||
|
multiple processes or machines by splitting input streams into evenly distributed chunks.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup
|
||||||
|
|
||||||
|
%build
|
||||||
|
%make_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license LICENSE
|
||||||
|
%{_bindir}/shardz
|
||||||
|
%{_mandir}/man1/shardz.1*
|
||||||
|
%{_libdir}/pkgconfig/shardz.pc
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Dec 07 2024 acidvegas <acid.vegas@acid.vegas> - 1.0.1
|
||||||
|
- Initial package
|
Loading…
Reference in New Issue
Block a user