diff options
| author | Jan T <jan@jantuomi.fi> | 2026-07-23 19:24:22 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2026-07-23 19:26:00 +0300 |
| commit | d57b5cd7830a5b4ed1437b1b648dca62a9b6eea3 (patch) | |
| tree | 85c5e69424dd2fe4c07be9dbb1b4267ee1503c3d /www/pastebin | |
*/*: initial commit
Diffstat (limited to 'www/pastebin')
| -rw-r--r-- | www/pastebin/Makefile | 35 | ||||
| -rw-r--r-- | www/pastebin/Makefile.crates | 305 | ||||
| -rw-r--r-- | www/pastebin/distinfo | 0 | ||||
| -rw-r--r-- | www/pastebin/files/pastebin.in | 48 | ||||
| -rw-r--r-- | www/pastebin/pkg-descr | 1 |
5 files changed, 389 insertions, 0 deletions
diff --git a/www/pastebin/Makefile b/www/pastebin/Makefile new file mode 100644 index 0000000..6c18ca7 --- /dev/null +++ b/www/pastebin/Makefile @@ -0,0 +1,35 @@ +PORTNAME= pastebin +PORTVERSION= 2.0.2 +CATEGORIES= www + +MAINTAINER= jan@jantuomi.fi +COMMENT= Minimal pastebin service +WWW= https://github.com/w4/bin + +LICENSE= MIT + +LIB_DEPENDS= libgit2.so:devel/libgit2 \ + libonig.so:devel/oniguruma + +USES= cargo localbase + +USE_GITHUB= yes +GH_ACCOUNT= w4 +GH_PROJECT= bin +GH_TAGNAME= v2.0.2 + +NO_CHECKSUM= yes + +CARGO_INSTALL= no + +PLIST_FILES= bin/pastebin + +SUB_LIST= PREFIX=${PREFIX} +USE_RC_SUBR= pastebin + +.sinclude "${.CURDIR}/Makefile.crates" + +do-install: + ${INSTALL_PROGRAM} ${CARGO_TARGET_DIR}/release/bin ${STAGEDIR}${PREFIX}/bin/pastebin + +.include <bsd.port.mk> diff --git a/www/pastebin/Makefile.crates b/www/pastebin/Makefile.crates new file mode 100644 index 0000000..9ba4be8 --- /dev/null +++ b/www/pastebin/Makefile.crates @@ -0,0 +1,305 @@ +CARGO_CRATES= actix-0.13.5 \ + actix-codec-0.5.2 \ + actix-http-3.11.0 \ + actix-macros-0.2.4 \ + actix-router-0.5.3 \ + actix-rt-2.10.0 \ + actix-server-2.6.0 \ + actix-service-2.0.3 \ + actix-utils-3.0.1 \ + actix-web-4.11.0 \ + actix-web-codegen-4.3.0 \ + actix_derive-0.6.2 \ + addr2line-0.24.2 \ + adler2-2.0.0 \ + aho-corasick-1.1.3 \ + alloc-no-stdlib-2.0.4 \ + alloc-stdlib-0.2.2 \ + ansi_colours-1.2.3 \ + anstream-0.6.18 \ + anstyle-1.0.10 \ + anstyle-parse-0.2.6 \ + anstyle-query-1.1.2 \ + anstyle-wincon-3.0.8 \ + anyhow-1.0.98 \ + argh-0.1.13 \ + argh_derive-0.1.13 \ + argh_shared-0.1.13 \ + askama-0.14.0 \ + askama_derive-0.14.0 \ + askama_parser-0.14.0 \ + autocfg-1.4.0 \ + backtrace-0.3.75 \ + base64-0.22.1 \ + basic-toml-0.1.10 \ + bat-0.25.0 \ + bincode-1.3.3 \ + bitflags-1.3.2 \ + bitflags-2.9.1 \ + block-buffer-0.10.4 \ + brotli-8.0.1 \ + brotli-decompressor-5.0.0 \ + bstr-1.12.0 \ + bugreport-0.5.1 \ + bytemuck-1.23.0 \ + bytes-1.10.1 \ + bytesize-1.3.3 \ + bytestring-1.4.0 \ + cc-1.2.24 \ + cfg-if-1.0.0 \ + clap-4.5.38 \ + clap_builder-4.5.38 \ + clap_lex-0.7.4 \ + clircle-0.6.1 \ + cloudabi-0.0.3 \ + colorchoice-1.0.3 \ + console-0.15.11 \ + content_inspector-0.2.4 \ + cookie-0.16.2 \ + core-foundation-sys-0.8.7 \ + cpufeatures-0.2.17 \ + crc32fast-1.4.2 \ + crossbeam-channel-0.5.15 \ + crossbeam-deque-0.8.6 \ + crossbeam-epoch-0.9.18 \ + crossbeam-utils-0.8.21 \ + crypto-common-0.1.6 \ + darling-0.20.11 \ + darling_core-0.20.11 \ + darling_macro-0.20.11 \ + deranged-0.4.0 \ + derive_more-2.0.1 \ + derive_more-impl-2.0.1 \ + digest-0.10.7 \ + displaydoc-0.2.5 \ + either-1.15.0 \ + encode_unicode-1.0.0 \ + encoding_rs-0.8.35 \ + env_logger-0.10.2 \ + equivalent-1.0.2 \ + errno-0.3.12 \ + etcetera-0.8.0 \ + flate2-1.1.1 \ + fnv-1.0.7 \ + foldhash-0.1.5 \ + form_urlencoded-1.2.1 \ + fuchsia-cprng-0.1.1 \ + futures-0.3.31 \ + futures-channel-0.3.31 \ + futures-core-0.3.31 \ + futures-executor-0.3.31 \ + futures-io-0.3.31 \ + futures-macro-0.3.31 \ + futures-sink-0.3.31 \ + futures-task-0.3.31 \ + futures-util-0.3.31 \ + generic-array-0.14.7 \ + getrandom-0.3.3 \ + gimli-0.31.1 \ + git-version-0.3.9 \ + git-version-macro-0.3.9 \ + git2-0.19.0 \ + glob-0.3.2 \ + globset-0.4.16 \ + gpw-0.1.0 \ + grep-cli-0.1.11 \ + h2-0.3.26 \ + hashbrown-0.15.3 \ + hermit-abi-0.5.1 \ + home-0.5.11 \ + htmlescape-0.3.1 \ + http-0.2.12 \ + httparse-1.10.1 \ + httpdate-1.0.3 \ + humantime-2.2.0 \ + icu_collections-2.0.0 \ + icu_locale_core-2.0.0 \ + icu_normalizer-2.0.0 \ + icu_normalizer_data-2.0.0 \ + icu_properties-2.0.1 \ + icu_properties_data-2.0.1 \ + icu_provider-2.0.0 \ + ident_case-1.0.1 \ + idna-1.0.3 \ + idna_adapter-1.2.1 \ + impl-more-0.1.9 \ + indexmap-2.9.0 \ + is-terminal-0.4.16 \ + is_terminal_polyfill-1.70.1 \ + itertools-0.7.11 \ + itertools-0.13.0 \ + itoa-1.0.15 \ + jobserver-0.1.33 \ + language-tags-0.3.2 \ + libc-0.2.172 \ + libgit2-sys-0.17.0+1.8.1 \ + libz-sys-1.1.22 \ + linked-hash-map-0.5.6 \ + linux-raw-sys-0.9.4 \ + litemap-0.8.0 \ + local-channel-0.1.5 \ + local-waker-0.1.4 \ + lock_api-0.4.12 \ + log-0.4.27 \ + matrixmultiply-0.1.15 \ + memchr-2.7.4 \ + mime-0.3.17 \ + miniz_oxide-0.8.8 \ + mio-1.0.4 \ + ndarray-0.12.1 \ + ntapi-0.4.1 \ + nu-ansi-term-0.50.1 \ + num-complex-0.2.4 \ + num-conv-0.1.0 \ + num-traits-0.2.19 \ + object-0.36.7 \ + once_cell-1.21.3 \ + once_cell_polyfill-1.70.1 \ + onig-6.5.1 \ + onig_sys-69.9.1 \ + parking_lot-0.12.3 \ + parking_lot_core-0.9.10 \ + path_abs-0.5.1 \ + percent-encoding-2.3.1 \ + pin-project-lite-0.2.16 \ + pin-utils-0.1.0 \ + pkg-config-0.3.32 \ + plist-1.7.1 \ + potential_utf-0.1.2 \ + powerfmt-0.2.0 \ + ppv-lite86-0.2.21 \ + pretty_env_logger-0.5.0 \ + proc-macro2-1.0.95 \ + quick-xml-0.32.0 \ + quote-1.0.40 \ + r-efi-5.2.0 \ + rand-0.5.6 \ + rand-0.9.1 \ + rand_chacha-0.9.0 \ + rand_core-0.3.1 \ + rand_core-0.4.2 \ + rand_core-0.9.3 \ + rawpointer-0.1.0 \ + rayon-1.10.0 \ + rayon-core-1.12.1 \ + redox_syscall-0.5.12 \ + regex-1.11.1 \ + regex-automata-0.4.9 \ + regex-lite-0.1.6 \ + regex-syntax-0.8.5 \ + rgb-0.8.50 \ + rust-fuzzy-search-0.1.1 \ + rustc-demangle-0.1.24 \ + rustc-hash-2.1.1 \ + rustix-1.0.7 \ + ryu-1.0.20 \ + same-file-1.0.6 \ + scopeguard-1.2.0 \ + semver-1.0.26 \ + serde-1.0.219 \ + serde_derive-1.0.219 \ + serde_json-1.0.140 \ + serde_spanned-0.6.8 \ + serde_urlencoded-0.7.1 \ + serde_with-3.12.0 \ + serde_with_macros-3.12.0 \ + serde_yaml-0.9.34+deprecated \ + sha1-0.10.6 \ + shell-escape-0.1.5 \ + shell-words-1.1.0 \ + shlex-1.3.0 \ + signal-hook-registry-1.4.5 \ + slab-0.4.9 \ + smallvec-1.15.0 \ + socket2-0.5.9 \ + stable_deref_trait-1.2.0 \ + std_prelude-0.2.12 \ + strsim-0.11.1 \ + syn-2.0.101 \ + synstructure-0.13.2 \ + syntect-5.2.0 \ + sysinfo-0.33.1 \ + termcolor-1.4.1 \ + terminal-colorsaurus-0.4.8 \ + terminal-trx-0.2.4 \ + terminal_size-0.4.2 \ + thiserror-1.0.69 \ + thiserror-impl-1.0.69 \ + time-0.3.41 \ + time-core-0.1.4 \ + time-macros-0.2.22 \ + tinystr-0.8.1 \ + tokio-1.45.1 \ + tokio-util-0.7.15 \ + toml-0.8.22 \ + toml_datetime-0.6.9 \ + toml_edit-0.22.26 \ + toml_write-0.1.1 \ + tracing-0.1.41 \ + tracing-attributes-0.1.28 \ + tracing-core-0.1.33 \ + typenum-1.18.0 \ + unicode-ident-1.0.18 \ + unicode-width-0.1.14 \ + unicode-width-0.2.0 \ + unicode-xid-0.2.6 \ + unsafe-libyaml-0.2.11 \ + url-2.5.4 \ + utf8_iter-1.0.4 \ + utf8parse-0.2.2 \ + vcpkg-0.2.15 \ + version_check-0.9.5 \ + walkdir-2.5.0 \ + wasi-0.11.0+wasi-snapshot-preview1 \ + wasi-0.14.2+wasi-0.2.4 \ + wild-2.2.1 \ + winapi-0.3.9 \ + winapi-i686-pc-windows-gnu-0.4.0 \ + winapi-util-0.1.9 \ + winapi-x86_64-pc-windows-gnu-0.4.0 \ + windows-0.56.0 \ + windows-0.57.0 \ + windows-core-0.56.0 \ + windows-core-0.57.0 \ + windows-implement-0.56.0 \ + windows-implement-0.57.0 \ + windows-interface-0.56.0 \ + windows-interface-0.57.0 \ + windows-result-0.1.2 \ + windows-sys-0.48.0 \ + windows-sys-0.52.0 \ + windows-sys-0.59.0 \ + windows-targets-0.48.5 \ + windows-targets-0.52.6 \ + windows_aarch64_gnullvm-0.48.5 \ + windows_aarch64_gnullvm-0.52.6 \ + windows_aarch64_msvc-0.48.5 \ + windows_aarch64_msvc-0.52.6 \ + windows_i686_gnu-0.48.5 \ + windows_i686_gnu-0.52.6 \ + windows_i686_gnullvm-0.52.6 \ + windows_i686_msvc-0.48.5 \ + windows_i686_msvc-0.52.6 \ + windows_x86_64_gnu-0.48.5 \ + windows_x86_64_gnu-0.52.6 \ + windows_x86_64_gnullvm-0.48.5 \ + windows_x86_64_gnullvm-0.52.6 \ + windows_x86_64_msvc-0.48.5 \ + windows_x86_64_msvc-0.52.6 \ + winnow-0.7.10 \ + wit-bindgen-rt-0.39.0 \ + writeable-0.6.1 \ + xterm-color-1.0.1 \ + yaml-rust-0.4.5 \ + yoke-0.8.0 \ + yoke-derive-0.8.0 \ + zerocopy-0.8.25 \ + zerocopy-derive-0.8.25 \ + zerofrom-0.1.6 \ + zerofrom-derive-0.1.6 \ + zerotrie-0.2.2 \ + zerovec-0.11.2 \ + zerovec-derive-0.11.1 \ + zstd-0.13.3 \ + zstd-safe-7.2.4 \ + zstd-sys-2.0.15+zstd.1.5.7 diff --git a/www/pastebin/distinfo b/www/pastebin/distinfo new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/www/pastebin/distinfo diff --git a/www/pastebin/files/pastebin.in b/www/pastebin/files/pastebin.in new file mode 100644 index 0000000..bf499bf --- /dev/null +++ b/www/pastebin/files/pastebin.in @@ -0,0 +1,48 @@ +#!/bin/sh + +# PROVIDE: pastebin +# REQUIRE: NETWORKING +# KEYWORD: shutdown + +. /etc/rc.subr + +name="pastebin" +rcvar="pastebin_enable" +pidfile="/var/run/${name}.pid" + +load_rc_config "$name" + +: ${pastebin_enable:="NO"} +: ${pastebin_listen:="0.0.0.0:80"} + +start_cmd="${name}_start" +stop_cmd="${name}_stop" +status_cmd="${name}_status" + +pastebin_start() +{ + echo "Starting ${name}..." + daemon -p "${pidfile}" -o /var/log/pastebin.log \ + %%PREFIX%%/bin/pastebin "${pastebin_listen}" +} + +pastebin_stop() +{ + if [ -f "${pidfile}" ]; then + echo "Stopping ${name}..." + kill "$(cat "${pidfile}")" 2>/dev/null + rm -f "${pidfile}" + fi +} + +pastebin_status() +{ + if [ -f "${pidfile}" ] && kill -0 "$(cat "${pidfile}")" 2>/dev/null; then + echo "${name} is running as pid $(cat "${pidfile}")" + else + echo "${name} is not running" + return 1 + fi +} + +run_rc_command "$1" diff --git a/www/pastebin/pkg-descr b/www/pastebin/pkg-descr new file mode 100644 index 0000000..bbb5bad --- /dev/null +++ b/www/pastebin/pkg-descr @@ -0,0 +1 @@ +A minimal pastebin service written in Rust. |
