# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           golang 1.0

go.setup            github.com/filebrowser/filebrowser 2.44.2 v
set git-commit      c18afcd
# This line is for displaying commit in CLI only
revision            0
categories          net sysutils
maintainers         {i0ntempest @i0ntempest} openmaintainer
license             Apache-2

description         Web File Browser
long_description    ${name} provides a file managing interface within a specified directory\
                    and it can be used to upload, delete, preview, rename and edit your files.\
                    It allows the creation of multiple users and each user can have its own directory.\
                    It can be used as a standalone app or as a middleware.

homepage            https://filebrowser.org

checksums           ${distname}${extract.suffix} \
                        rmd160  73a1bc6ed423866f34940cc161d51de6d0979a3a \
                        sha256  a1825ead2a890fb5b7d6c73d3a5f4518fb8479b0a1c10aa6ce5ba495ebaa4b65 \
                        size    5296320

go.vendors          gopkg.in/yaml.v3 \
                        lock    v3.0.1 \
                        rmd160  e85ac1368fb7f9ef945b7fd7bd608a1f0d261c12 \
                        sha256  f3ea6be3f405ec25f8799773355aba54f8831d11f5315a01155bdc69b92eca7b \
                        size    91208 \
                    gopkg.in/yaml.v2 \
                        lock    v2.4.0 \
                        rmd160  66e9feb7944b3804efa63155ed9b618717b8955c \
                        sha256  72812077e7f20278003de6ab0d85053d89131d64c443f39115a022114fd032b6 \
                        size    73231 \
                    gopkg.in/natefinch/lumberjack.v2 \
                        lock    v2.2.1 \
                        rmd160  8c8f0fe65acca516cbc84ba6c61a9b02e470df64 \
                        sha256  32f0b88971fbfef73e416def181ef5320c225c59ea2b2446c05a46ac1d7f3ff6 \
                        size    12570 \
                    gopkg.in/check.v1 \
                        lock    10cb98267c6c \
                        rmd160  465dcadb97762c84da6fb5f6d8352abe10445817 \
                        sha256  98ec7bd0dc7d4bcee7dcafe02efab29f14dc392f43b227e517beef064e9b6369 \
                        size    32368 \
                    google.golang.org/protobuf \
                        repo    github.com/protocolbuffers/protobuf-go \
                        lock    v1.36.4 \
                        rmd160  2681958210bb5477344897a78a70134263130aef \
                        sha256  4adda71125389e854feb49f50da1db00c78b713ed8635865985faf6ca7243ec2 \
                        size    1963705 \
                    google.golang.org/appengine \
                        repo    github.com/golang/appengine \
                        lock    v1.6.5 \
                        rmd160  07930ae377345a90ef1f84200cdb2c292b192c60 \
                        sha256  544d882b8fc91ac0813e239d9602034bae8d9b5b7fd1e5872323680a4f493bdd \
                        size    332918 \
                    golang.org/x/text \
                        lock    v0.27.0 \
                        rmd160  3e107b85875c286ddcfc1b54394511131beacef8 \
                        sha256  e17d0f44e43c08335322047d9310665e8cb0b4f796aff6efb5d2e6f89a9ee7a6 \
                        size    8974673 \
                    golang.org/x/sys \
                        lock    v0.34.0 \
                        rmd160  a87df453351955262c3e67ec823f0176b317f87d \
                        sha256  6f5791e51a2e6926432b508bcf89141356307d1b378a5b3ca9663df4f462c7a6 \
                        size    1531356 \
                    golang.org/x/sync \
                        lock    v0.16.0 \
                        rmd160  68d9738ce548abe5fee7f08d9a7ce87c6a3c56a8 \
                        sha256  490f41af712f24ebdd058f7b66666645800c32c66697c3f3878bc985a2cdac16 \
                        size    18193 \
                    golang.org/x/net \
                        lock    v0.42.0 \
                        rmd160  6fa0b8351464db25d1033c94a352d5776a063b53 \
                        sha256  3eb38644e1166af6362d1128cff5a62c43640df97142513bb9e7b0eabc0490fe \
                        size    1504674 \
                    golang.org/x/image \
                        lock    v0.29.0 \
                        rmd160  fe464eb4a95224e92c4fcaec1d319a8d1dce6c61 \
                        sha256  c165c210de91be781ef2666a7eb5df225e10f90cad5534b5229a9cab1c64dae8 \
                        size    5104256 \
                    golang.org/x/crypto \
                        lock    v0.40.0 \
                        rmd160  2dbe565575f53f28d76ebac2ac6ccf8fb635601c \
                        sha256  5c7ed3022e72024e1317e6ea95da45dbe992c9b901e1e4e7ad49bf30d08eb8d7 \
                        size    2167357 \
                    go4.org \
                        repo    github.com/go4org/go4 \
                        lock    214862532bf5 \
                        rmd160  85c4fa024ccdea62402e20dd8098a42422297fb9 \
                        sha256  fb511278b404d732fc69417645eed4a7b704db6b8b91e9b2a79c8423757e3efa \
                        size    151266 \
                    go.uber.org/multierr \
                        repo    github.com/uber-go/multierr \
                        lock    v1.11.0 \
                        rmd160  ae2a9f099696f51fd43d3f3815f75dab4b31f43b \
                        sha256  31a69a354aa218d2dc999fa7d22a68bbb67fe98c8b0b673046abfcef6502f6cb \
                        size    16914 \
                    go.uber.org/goleak \
                        repo    github.com/uber-go/goleak \
                        lock    v1.3.0 \
                        rmd160  aa886ccda5a90bd29394eb5cfdffd3ec4d7ce3cb \
                        sha256  d514163121ce220dd536aed595e5db68a469fd2622a93542f05eaeebc767ec3c \
                        size    20063 \
                    go.etcd.io/bbolt \
                        repo    github.com/etcd-io/bbolt \
                        lock    v1.4.2 \
                        rmd160  8d20e649b0dbc3607bb77d73b94183b8161f3313 \
                        sha256  3f75a86bc2ee4de3a2f475ddd2eb3ec8d9760745f678486116e4de503f377824 \
                        size    169443 \
                    github.com/yusufpapurcu/wmi \
                        lock    v1.2.4 \
                        rmd160  23599ad98727cca3e1678e909a1014e212d41fc7 \
                        sha256  05d3cee4c74f456174ea5538ee95fba675aeb520fd7bdd3872860a3c7dcafa11 \
                        size    12672 \
                    github.com/xyproto/randomstring \
                        lock    v1.0.5 \
                        rmd160  219c61e199d6c55c9bdabaa3072295a323f09c45 \
                        sha256  fc2b38b4964bf4744e1012c3fcec1da24949f5a262e72b2dfb59933d923daff2 \
                        size    3320 \
                    github.com/vmihailenco/msgpack \
                        lock    v4.0.4 \
                        rmd160  89df770ec853d2f63af382d7ebb109ad43a694cd \
                        sha256  fc5a47cf9572def5c376f25f031722819a218db68dc2c015bcda2398a29dc9a9 \
                        size    26969 \
                    github.com/ulikunitz/xz \
                        lock    v0.5.12 \
                        rmd160  923ba7590d3cca4de73ce2e9ef67c95ee58ec043 \
                        sha256  95db3e60ec33a8d9c8aa67f2e73a9d7680d52386dc9f132f0caf0815862a53ae \
                        size    4176123 \
                    github.com/tomasen/realip \
                        lock    f0c99a92ddce \
                        rmd160  9647d37dc83d15756eb5b168b44370311bea8e69 \
                        sha256  9e8bc86441796fe16edf2a271f5cdc6a561c633644efb6d326d65d8aadee29cc \
                        size    3125 \
                    github.com/subosito/gotenv \
                        lock    v1.6.0 \
                        rmd160  d99c048eeaed43103fbf28a86902dc5a2311f980 \
                        sha256  b5890171316a97614d5a45363350e9c575dfc61ec8249742e68ae97ca21a444c \
                        size    11487 \
                    github.com/stretchr/testify \
                        lock    v1.10.0 \
                        rmd160  43f142561513d8f10ce4971bf91cabbad9a021cc \
                        sha256  be33d85711f2b92b7269a39574af64701ed5b2c4e4446547ea75ea046ec97629 \
                        size    112769 \
                    github.com/stretchr/objx \
                        lock    v0.5.2 \
                        rmd160  96ffcde8897243df89c8da1084cb84c90eb72676 \
                        sha256  39661f2a3eb998c52776126d166556a804fa18bf7e2d7e4dc73e20cd25d3145c \
                        size    33242 \
                    github.com/spf13/viper \
                        lock    v1.20.1 \
                        rmd160  ad1e5c723ee41b23fa2ab15e419ba9522c74b468 \
                        sha256  511becd403b332ebdfa4f43ab2b7d25e9d567a6b4c7a5bba247a8e28102f09eb \
                        size    122252 \
                    github.com/spf13/pflag \
                        lock    v1.0.6 \
                        rmd160  71c96f5c72e1ec15157e4dd6438e69f717bd7b99 \
                        sha256  296b98eebe4fd4b6435afbb05a93ffd4e4cb20a54ab128f633b21cfac9f136e1 \
                        size    52859 \
                    github.com/spf13/cobra \
                        lock    v1.9.1 \
                        rmd160  95925251f62ff042108f882129779eae809a9a8c \
                        sha256  33dec62c9ce9622184102f590c5c97e4b6aaa6341510b3defc21c1266b31f057 \
                        size    197845 \
                    github.com/spf13/cast \
                        lock    v1.9.2 \
                        rmd160  82408f9af9df6fdef7b2d17a6708f4244f4235d1 \
                        sha256  41a899e9f36abcea37dbeb842ebf34986cd75347dfd52f8ae376786497a9d884 \
                        size    24199 \
                    github.com/spf13/afero \
                        lock    v1.14.0 \
                        rmd160  95180c509220d8ffdd6cfd9f9ca708ae3be7b1a5 \
                        sha256  880c030de2ca2e4652a6d6cb3e17b14fe9a096077c8f0b5858bad0bfdca279f5 \
                        size    93470 \
                    github.com/sourcegraph/conc \
                        lock    v0.3.0 \
                        rmd160  79458f4b5d9aca51fc58e3b3d31b54971169040b \
                        sha256  a35f688a3ff3dc8c86889947febcedf7af0517cd910d1057cba5a0a5c2386451 \
                        size    23025 \
                    github.com/sorairolake/lzip-go \
                        lock    v0.3.7 \
                        rmd160  1c04b0f26ab50341abf304c84144e0561247288b \
                        sha256  b27e4c3a680795565ced3b9ad8e0045505b2b6827391292acbd0c7d31f0a9f12 \
                        size    100670 \
                    github.com/shirou/gopsutil \
                        lock    v3.24.5 \
                        rmd160  5638720e2b30a7c322db690649df0c2aca5f196c \
                        sha256  d04073089f696418942a30d8cb4878e9709e79ffcfb92f1f61ba92d7bba56cc5 \
                        size    185793 \
                    github.com/sagikazarmark/locafero \
                        lock    v0.9.0 \
                        rmd160  d9ce8795094d1b58cfa1b341ce18517d26aea038 \
                        sha256  fc5bab4edcddad796fcfd48b95f009c6750e6a1dffedc3ccb68cc4366f33f43a \
                        size    11070 \
                    github.com/rogpeppe/go-internal \
                        lock    v1.13.1 \
                        rmd160  e5ca6d61da75f8a4093a42ba756d1b8cced6d2ef \
                        sha256  8a0ba057c15bed0feb0497cfd0451c6622081c0026ecca6fc3cc03faeb9c93ed \
                        size    116450 \
                    github.com/power-devops/perfstat \
                        lock    82ca36839d55 \
                        rmd160  7eee6195706388727dc34c06a62b383e4bf2461a \
                        sha256  412cdaaa4dc915dd407ca0f53cd7875df7b10d886984d24d563db466d733b07f \
                        size    37883 \
                    github.com/pmezard/go-difflib \
                        lock    5d4384ee4fb2 \
                        rmd160  18b381fb63f46047dcc373a07a40e026b1ce1732 \
                        sha256  64935467335b4dff1a510bc726473b9f97124ca6be3fe74c9c2382b0ff6675aa \
                        size    11401 \
                    github.com/pierrec/lz4 \
                        lock    v4.1.22 \
                        rmd160  6936dabff92b21b67cd3879e828099d76628eacc \
                        sha256  24a523681fcfcda7b460be6fa2e1c43cd64fed0fe5e0c0f75b58456a2aeff679 \
                        size    40916276 \
                    github.com/pelletier/go-toml \
                        lock    v2.2.4 \
                        rmd160  c6b4175dbd349733e98c60281e26019a058414e4 \
                        sha256  490e728a2d923c63d04783a021b5727545f032979233b0bc6b4e20959e35614d \
                        size    910386 \
                    github.com/nwaples/rardecode \
                        lock    v2.1.1 \
                        rmd160  e4a6a9cb321f88586c26296e12c87d5e8db6c120 \
                        sha256  70b81d6e279c82e260b246987f3cf489557202f2bdc5d015dcb838efe6e14034 \
                        size    39877 \
                    github.com/mitchellh/go-homedir \
                        lock    v1.1.0 \
                        rmd160  44b3985e40e5bbb22d11f8622c340f9ed727ea91 \
                        sha256  024c8a57316c7fbc0eb23cdbfd57f72a74b51beb83d714034d67ee9aba48100c \
                        size    3366 \
                    github.com/minio/minlz \
                        lock    v1.0.1 \
                        rmd160  8507e58879c957d1185290e95090410695f773ee \
                        sha256  4f82c51b0770249f3e9e1d9b9ab0791195a671890d950f76dbd037920bd2d991 \
                        size    14436276 \
                    github.com/mikelolasagasti/xz \
                        lock    v1.0.1 \
                        rmd160  22762cd42d55ab02090e1b16f57bdd94da48e11e \
                        sha256  a7b5a64d9691e205b2f3a23d6225bfcfa2b65e6d3beefc1e2c108a6d765e1be0 \
                        size    1135861 \
                    github.com/mholt/archives \
                        lock    v0.1.3 \
                        rmd160  4c330394b7fb7bfe51f5c4882b4e829a9e87441e \
                        sha256  b0f9766d53849e7fdad0d576525b026722773b07c25bf902ba6c4ee4bebe0657 \
                        size    66403 \
                    github.com/marusama/semaphore \
                        lock    v2.5.0 \
                        rmd160  9335f483b0ea9582971a2ab5c962bc5f222c6e6b \
                        sha256  ef9e467334fbd0aa5411f6c193c855e25335b4abd34648fde67348171b68a4c0 \
                        size    6840 \
                    github.com/maruel/natural \
                        lock    v1.1.1 \
                        rmd160  3d250ed7f6f152a6fa430deb82b6990c6412b7f7 \
                        sha256  ae8a1de236bfabd95fcf5cf90deaa40db6527683b6dd8be6c17605d8619a6578 \
                        size    9187 \
                    github.com/kr/text \
                        lock    v0.2.0 \
                        rmd160  48558c7e8ff67d510f83c66883907e95f4783163 \
                        sha256  2f2e21ac8a9d523e88cbba4039441defc4a66bfaa78811c900a88fcf28729c4c \
                        size    8702 \
                    github.com/kr/pretty \
                        lock    v0.3.1 \
                        rmd160  8c08579b4c56cdc958794e77afe3413e80aa67c3 \
                        sha256  7fcea475d6280976cf4a838e75d2b3a4105827316e588a80e49e8063d950c999 \
                        size    10232 \
                    github.com/klauspost/pgzip \
                        lock    v1.2.6 \
                        rmd160  fd9f702d2a491731aaf2fe6e3d2feb72af478064 \
                        sha256  74a375eafe83f302924d00ad5a59825b12e3f325e992f300e421ede9ada1c608 \
                        size    125971 \
                    github.com/klauspost/compress \
                        lock    v1.18.0 \
                        rmd160  641294afaa0766e028b582ef93f027997e6b795a \
                        sha256  9953494099d6853773afd56ccbcc8d4928b537ad30e475983524a7a0fc87e180 \
                        size    39079077 \
                    github.com/jellydator/ttlcache \
                        lock    v3.4.0 \
                        rmd160  3e473ebd0b0a960ef2c05052c10c7f6a88845dbb \
                        sha256  b24c49a2cb50882c10c10836af4285deb2792d3795352a4c14ca656ed128b4af \
                        size    24380 \
                    github.com/inconshreveable/mousetrap \
                        lock    v1.1.0 \
                        rmd160  88f9577df93ac0f8801d8960adc7f28e38867f3e \
                        sha256  f69af10ff08c0e87f92dac3ee5172d8ed02463725b74edfc8943ef018a1a632d \
                        size    5343 \
                    github.com/hashicorp/golang-lru \
                        lock    v2.0.7 \
                        rmd160  2f1bb029285d1f25ec7b2b55623c8b8a221154c0 \
                        sha256  7e0d056d9ae52e411de5945162e0dee0e7974dec527858f2fec39cfeff6afd3f \
                        size    23862 \
                    github.com/gorilla/websocket \
                        lock    v1.5.3 \
                        rmd160  3c38c85e08c20fe93c0100bf884feb8fe45fbaed \
                        sha256  bbdca57ccb9369617abde8372d36f0b2ef7cf6208debdbb9ade97808d2ce42a7 \
                        size    54891 \
                    github.com/gorilla/mux \
                        lock    v1.8.1 \
                        rmd160  7987ea5739b61af51e69127d23644c5760df3def \
                        sha256  55f5c50f77a44031da4bae5e5725a301a36a6072e42139e55afc606d631848fe \
                        size    47042 \
                    github.com/google/go-cmp \
                        lock    v0.7.0 \
                        rmd160  3f04a79c291d786f9c69c2944bdd521402052a5c \
                        sha256  b621b304b529134076c9ebe09343aea7add039cd98e68be7e5a616245b0c3d03 \
                        size    105180 \
                    github.com/golang/snappy \
                        lock    v1.0.0 \
                        rmd160  ecac40a18983ad6c8eae67112d4786a5a1171498 \
                        sha256  c67f26cd4d8e5fe382f9ce4e6d8cfd76d4e43383986b7f9fd9539efe3e842dd2 \
                        size    66178 \
                    github.com/golang/protobuf \
                        lock    v1.5.3 \
                        rmd160  b4e09ad842f6dcd3aea36b28ec64d6d9563fd1d8 \
                        sha256  12e830fab630cabd279fca57e7089eeb1556e2c22b58eee64bb21bd3c8dfc706 \
                        size    171856 \
                    github.com/golang/geo \
                        lock    c5087ca84cf4 \
                        rmd160  e2c84c382ca24ce9319a7e180e5b90fcaada8f84 \
                        sha256  f9a224b9e7af869263b236b1c8dec96f3638e744ed2e47dea9780c567993d5bf \
                        size    439732 \
                    github.com/golang-jwt/jwt \
                        lock    v4.5.2 \
                        rmd160  6c674eb7c301b3b9cbc314c0645410374472feaa \
                        sha256  9fc1ab8e5c8a9d80c9d0d99778e168211203f630fa82771daefee00723b55927 \
                        size    54035 \
                    github.com/go-viper/mapstructure \
                        lock    v2.4.0 \
                        rmd160  05995801229f38d733bd89c6fddc18b634380ec4 \
                        sha256  cea95a872d7dbfcfe327f65a1299871ddf75dec2a21efab6f1a0294d16e8a45f \
                        size    53320 \
                    github.com/go-ole/go-ole \
                        lock    v1.3.0 \
                        rmd160  7080182feca14a6bea1be4e854c1e4c82415c366 \
                        sha256  7520bd87b1d52a28b98c5fa4243338c5c7cf5185fdd058f55ff6d670c455b13e \
                        size    53295 \
                    github.com/go-errors/errors \
                        lock    v1.5.1 \
                        rmd160  c523ee868f3f64919429a97f824a60fabaf7db72 \
                        sha256  1256e22b062196c40b171026ee77aeff9229c47aa609583e0eb2b5d3dd57459e \
                        size    9918 \
                    github.com/fsnotify/fsnotify \
                        lock    v1.9.0 \
                        rmd160  24b514b003e8a613b938e13f7df3ba60dc755499 \
                        sha256  46aaaf931594e32ce1e087da58dc8d3e27f0e34eaca38a9280f6c10a198d4166 \
                        size    73949 \
                    github.com/frankban/quicktest \
                        lock    v1.14.6 \
                        rmd160  d517a6cb2f6acc7f969c9ed49f464014a717bf98 \
                        sha256  0142a3dd40b949b4d7e86768020e5f3c08fe026447458fd975b1b4c1f18b0745 \
                        size    40112 \
                    github.com/flynn/go-shlex \
                        lock    3f9db97f8568 \
                        rmd160  ec42eaffe2cf17a46e12c7c2a7d436c0f68ba655 \
                        sha256  b4205ec400df652238f7ed287c4b77b5f17a17d5793cd5371b7cc5e0f07dfeed \
                        size    7690 \
                    github.com/dsoprea/go-utility \
                        lock    a3e1774ef349 \
                        rmd160  6c35225f05a14f11d74c88a76a44beefddb453a1 \
                        sha256  fec1255f62ac64b94fa9eeb9f9e8d1956951598d79c5733b2f1c5f9c10aac289 \
                        size    53998 \
                    github.com/dsoprea/go-logging \
                        lock    b02d349568dd \
                        rmd160  1a76d3964b65d884287b2cd4f0587715c5df3b01 \
                        sha256  e59b2c1d63ab132cff37ca2caaf77291d96c9e232f3888702185e3e8048b5209 \
                        size    18567 \
                    github.com/dsoprea/go-exif \
                        lock    v3.0.1 \
                        rmd160  eb875170b1e53b9de7602291d34989131585882b \
                        sha256  e88684c165b842937d68d0b2aee02b5d281846df6174f4894b97f76de793e5f8 \
                        size    28371842 \
                    github.com/dsnet/compress \
                        lock    39efe44ab707 \
                        rmd160  3feaf8dbede822068dc3cae99d09cdcad970833f \
                        sha256  e95b954a1108362b224df41eaae2d47036a8db2626199a409154a23e150e53dd \
                        size    9962952 \
                    github.com/disintegration/imaging \
                        lock    v1.6.2 \
                        rmd160  eb7fc30603404bee955019c2a1a5f717bc784f89 \
                        sha256  69d5d90553fd187844d8ef4a8d89da9a6c9c1ec29402b44521aaa85640d0b83f \
                        size    2212673 \
                    github.com/davecgh/go-spew \
                        lock    d8f796af33cc \
                        rmd160  412da847dd485c586e0557e0e511bbdab6c7e929 \
                        sha256  989c527fb1568e2bfd9d4bec811d67ababa346d20fa2ffcc0760fad258241c26 \
                        size    42174 \
                    github.com/bodgit/windows \
                        lock    v1.0.1 \
                        rmd160  835e08798db8eb49026bd1c5fb081e5ddd662f5e \
                        sha256  56539f916b569e321b3390db67ffc514f4c8731daeac3cdb50736f31586bf522 \
                        size    3422 \
                    github.com/bodgit/sevenzip \
                        lock    v1.6.1 \
                        rmd160  fd3d20323485326a0af9f47531974c35105c56d0 \
                        sha256  4b0c99ef18020dc7f360ef572a7b073430243d49635005289aa387e5fbc40e5f \
                        size    1527919 \
                    github.com/bodgit/plumbing \
                        lock    v1.3.0 \
                        rmd160  88a6f3cc48cb9f5b29f50bcacbc57196409ef4fa \
                        sha256  5b4255559459410a444485e054dff334abb9211668ae42b0a8a423c64bf0e7d3 \
                        size    7459 \
                    github.com/asticode/go-astits \
                        lock    v1.13.0 \
                        rmd160  ffbbde60b9adc2a1877b423346f32b9948d7a40e \
                        sha256  cf4a32e1985c30b326c335bcb57f24888654b1779317d9655a269ce2eb33c9a9 \
                        size    3117747 \
                    github.com/asticode/go-astisub \
                        lock    v0.34.0 \
                        rmd160  ab47d019e39f107b24caedb09d1df41029a76b7c \
                        sha256  9e216830ce4ac74aef4e2ea49d7886f16b05e08cbaafce977f0d91b82773b74b \
                        size    65392 \
                    github.com/asticode/go-astikit \
                        lock    v0.56.0 \
                        rmd160  03dcae3e195cb3611e12d5d52c04ce664d890b7e \
                        sha256  361804048a2716d1e7a441a0b5976f7c78695582b003218955f7f531678998a2 \
                        size    54484 \
                    github.com/asdine/storm \
                        lock    v3.2.1 \
                        rmd160  47eaabb9d1c7327074b06f42d7ea73b91f4e2dcf \
                        sha256  440de0ffdfd90c4234ebcb3a4bbf402311c353b7a8bdda5c58b7505f711bb299 \
                        size    47935 \
                    github.com/andybalholm/brotli \
                        lock    v1.2.0 \
                        rmd160  8a255f272bdfb43b5b7ffb844d9875b6ee57ede3 \
                        sha256  c73059182de43d910b023378e412c39a2e29eed2deaa4f9583d9245ad44a384d \
                        size    1832837 \
                    github.com/Sereal/Sereal \
                        lock    0b8ac451a863 \
                        rmd160  30ae87dc25e4976aabc8dc8ce74dc2fa6023aed3 \
                        sha256  829b952da1331c06fa7dabb6f26739d8d573e48bf687a59c17bfae42aabd2298 \
                        size    2408929 \
                    github.com/STARRY-S/zip \
                        lock    v0.2.3 \
                        rmd160  af20c75ee60a91c94b06c49363fd613509876b7d \
                        sha256  1aeb24428037164bbfccc57bbcb26abc48862b7100723e6eecea18b7e93bf1da \
                        size    58988 \
                    github.com/DataDog/zstd \
                        lock    v1.4.1 \
                        rmd160  86c75e5feafd8e615a7eea3b97680c0543a95380 \
                        sha256  f62a03934f91b063545ce33c40526d33d52fb07dbfbced5dd5b531295b37af4c \
                        size    498943

# Notes for updating this port:
# Remember to update git commit hash

# Context menu: https://github.com/filebrowser/filebrowser/pull/3343
patchfiles-append   patch-3343.diff
patch.args          -p1

depends_build-append \
                    path:bin/node:nodejs22 \
                    port:pnpm

platform darwin {
    if {${os.major} < 20} {
        # 10.15-
        depends_build-replace \
                    path:bin/node:nodejs22 \
                    path:bin/node:nodejs18
    }
}

pre-build {
    # See ${worksrcpath}/Makefile for frontend build commands
    system -W ${worksrcpath}/frontend "${prefix}/bin/pnpm --verbose install --frozen-lockfile && \
                                       ${prefix}/bin/pnpm --verbose run build"
}

build.args-append   -ldflags=\"-X 'github.com/filebrowser/filebrowser/version.Version=${version}' -X 'github.com/filebrowser/filebrowser/version.CommitSHA=${git-commit}'\"

destroot {
    xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/
    # All supported shells: bash, fish, powershell, zsh
    set comp_path(bash) ${destroot}${prefix}/share/bash-completion/completions/${name}
    set comp_path(fish) ${destroot}${prefix}/share/fish/completions/${name}.fish
    set comp_path(zsh)  ${destroot}${prefix}/share/zsh/site-functions/_${name}
    foreach shell {bash fish zsh} {
        xinstall -d [file dirname $comp_path(${shell})]
        system -W ${worksrcpath} "./${name} completion ${shell} > $comp_path(${shell})"
    }
    file mkdir ${destroot}${prefix}/etc/filebrowser/
    copy ${filespath}/config.json ${destroot}${prefix}/etc/filebrowser/config.json.example
    reinplace "s|@@PREFIX@@|${prefix}|g" ${destroot}${prefix}/etc/filebrowser/config.json.example
}

post-activate {
    if {![file exists ${prefix}/etc/filebrowser/config.json]} {
        copy ${prefix}/etc/filebrowser/config.json.example ${prefix}/etc/filebrowser/config.json
    }
}

startupitem.create          yes
startupitem.executable      ${prefix}/bin/filebrowser --config ${prefix}/etc/filebrowser/config.json

notes-append "
    The example config file is copied to ${prefix}/etc/filebrowser/config.json and its content\
    will be preserved across upgrades and reinstalls. This config file configures filebrowser\
    to use /var/empty as root by default for safety reasons, so modify it before using. The\
    startup item will use this config file by default.\

    The default login and password for the Web UI is admin and admin. Change this as soon as\
    you can.
"

variant command_runner description {Force enable the potentially vulnerable command runner disabled in a previous version} {
    startupitem.executable-append \
                            --disable-exec=false
    notes-append            "
        You have enabled the potentially vulnerable command runner functionality in the startup script.\
        Only use this if you are aware of the risks. See https://github.com/filebrowser/filebrowser/issues/5199\
        for details.
    "
}
