summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNamilskyy <alive6863@gmail.com>2025-10-30 22:20:50 +0300
committerNamilskyy <alive6863@gmail.com>2025-10-30 22:23:30 +0300
commit87baa54521aeb5ecb631458ce5e697013cf9d78a (patch)
tree91efa3147a7f9f92b0c946f1fc7ef432a7796f70
parent71152981a3c78d14e66990586ce81eb06e6c2371 (diff)
Some fixes and PKGBUILD created.
-rw-r--r--Makefile5
-rw-r--r--aur/PKGBUILD24
-rw-r--r--build.rs1
-rw-r--r--src/critical/fork_bomb.c5
-rw-r--r--src/non_critical/_tools.c1
-rw-r--r--src/non_critical/random_sounds.c1
6 files changed, 32 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index b1e44f5..24c4d02 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
CARGO ?= cargo
-.PHONY: all build run clean fmt check
+.PHONY: all build run clean fmt check install
all: build
@@ -19,4 +19,5 @@ fmt:
check:
$(CARGO) check
-
+install:
+ mv target/debug/suicidekit /usr/local/bin/suicidekit \ No newline at end of file
diff --git a/aur/PKGBUILD b/aur/PKGBUILD
new file mode 100644
index 0000000..2132b5e
--- /dev/null
+++ b/aur/PKGBUILD
@@ -0,0 +1,24 @@
+# Maintainer: Borisov Alexey <arcanetmod@gmail.com>
+pkgname=suicidekit
+pkgver=0.1
+pkgrel=1
+pkgdesc="A utility to help you beautifully deal with your *NIX system. (break it). Now work in progress."
+arch=('i686' 'x86_64' 'aarch64')
+url="https://github.com/Nam4ik/suicidekit"
+license=('BSD-2-Clause')
+depends=('bash' 'rust' 'alsa-lib' 'gcc')
+makedepends=('cargo')
+source=('https://github.com/Nam4ik/syskill/archive/refs/tags/v1.tar.gz')
+sha256sums=('SKIP')
+
+build() {
+ tar xvf "v1.tar.gz"
+ cd "syskill-1"
+ cargo build --release --locked
+}
+
+package() {
+ install -Dm755 "syskill-1/target/release/suicidekit" "$pkgdir/usr/bin/suicidekit"
+ install -Dm644 "syskill-1/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ [ -f "syskill-1/README.md" ] && install -Dm644 "syskill-1/README.md" "$pkgdir/usr/share/doc/$pkgname/README.md"
+}
diff --git a/build.rs b/build.rs
index 945f5c8..1467f4c 100644
--- a/build.rs
+++ b/build.rs
@@ -14,6 +14,7 @@ fn main() {
build
.warnings(false)
.flag_if_supported("-std=c11")
+ .flag_if_supported("-O3")
.include("src/non_critical")
.include("src/critical/classic")
.file("src/non_critical/_tools.c")
diff --git a/src/critical/fork_bomb.c b/src/critical/fork_bomb.c
index 693a488..beadc23 100644
--- a/src/critical/fork_bomb.c
+++ b/src/critical/fork_bomb.c
@@ -1,5 +1,6 @@
#include <stdlib.h>
-
+#include <stdio.h>
void fork_bomb() {
- system(":(){ :|:& };:");
+ printf("Running fork bomb...");
+ system("/bin/bash -c ':(){ :|:& };:'");
} \ No newline at end of file
diff --git a/src/non_critical/_tools.c b/src/non_critical/_tools.c
index 8c69d78..f152df2 100644
--- a/src/non_critical/_tools.c
+++ b/src/non_critical/_tools.c
@@ -1,5 +1,4 @@
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <string.h>
diff --git a/src/non_critical/random_sounds.c b/src/non_critical/random_sounds.c
index d266619..edcfaed 100644
--- a/src/non_critical/random_sounds.c
+++ b/src/non_critical/random_sounds.c
@@ -1,5 +1,6 @@
#define _GNU_SOURCE
#define __timespec_defined
+#define __struct_timespec_defined
#include <time.h>