# -*- 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.49.0 v
set git-commit      119609c 
# 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  52be386520e6e8d46b35ec12e8ad71546c4b566f \
                        sha256  5f35beedf818feef315d84222dd957b8e10fab65a80a7d6ff10e22a31a11722f \
                        size    5363254

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/appengine \
                        repo    github.com/golang/appengine \
                        lock    v1.6.5 \
                        rmd160  07930ae377345a90ef1f84200cdb2c292b192c60 \
                        sha256  544d882b8fc91ac0813e239d9602034bae8d9b5b7fd1e5872323680a4f493bdd \
                        size    332918 \
                    golang.org/x/text \
                        lock    v0.31.0 \
                        rmd160  4739b997f583cd40e344ce91f5882f4bfef04ac3 \
                        sha256  11465ea85289ec2c719b442b3fba63c92a8fe01aa67ee2ea5e4f2723540b8809 \
                        size    8971076 \
                    golang.org/x/sys \
                        lock    v0.38.0 \
                        rmd160  116c6683aefacc223a60af4811ab8d97c4d3f6b0 \
                        sha256  5a63f5eb3814a66b1988ad9ff703c8d54d79463eed52a49f546091e17682cbc7 \
                        size    1535499 \
                    golang.org/x/sync \
                        lock    v0.18.0 \
                        rmd160  69493cbcd81930826ea5cce2de9e8c0215177f65 \
                        sha256  9338673389f61f2712ea2b1d8b3f8e741bc088ec10c248c1e8ad02d6c3a1866d \
                        size    18191 \
                    golang.org/x/net \
                        lock    v0.47.0 \
                        rmd160  cb483619404f77c733aae4a9529fd361c54dfd5b \
                        sha256  9921f979b5c270685d3728525236060bd55a1d84c7915ea4bda29503f7465497 \
                        size    1526927 \
                    golang.org/x/image \
                        lock    v0.33.0 \
                        rmd160  d719a49e01e5d6efec0a7d0f3427250f7094518e \
                        sha256  0ec17b04d2826063104d21ffa83cc9c0af07d0371e7fa638d644de19ec2e566b \
                        size    5111356 \
                    golang.org/x/crypto \
                        lock    v0.45.0 \
                        rmd160  5e8c5670b4ae9f82c9bc4e41dd2863beab2bd7e0 \
                        sha256  bd578b01007a7eccb50a26722812150c25361e900f329d961dcb1e52fa121ef0 \
                        size    2152069 \
                    go4.org \
                        repo    github.com/go4org/go4 \
                        lock    214862532bf5 \
                        rmd160  85c4fa024ccdea62402e20dd8098a42422297fb9 \
                        sha256  fb511278b404d732fc69417645eed4a7b704db6b8b91e9b2a79c8423757e3efa \
                        size    151266 \
                    go.yaml.in/yaml \
                        repo    github.com/yaml/go-yaml \
                        lock    v3.0.4 \
                        rmd160  ff5bc97155b2782fe3dfa394c8be1f8e71cee5ab \
                        sha256  6dc0cc7a57fb7bc812563a18a71aee2a08d866adc4415cd7eba2bafc3c6185e3 \
                        size    92702 \
                    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.3 \
                        rmd160  5dba870e0a02e5178144471fc839434518fe3172 \
                        sha256  e9a078270ee518612ff50ad2e0ee188686064d09a558f5c04f533d5f5811b852 \
                        size    170810 \
                    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.15 \
                        rmd160  a0a3f5ebde97db5d231fa9507321b57bf5b1a66b \
                        sha256  dd424b712889c875e36199854d1ff6653898d233e43a954efceb5f2ed4a68244 \
                        size    4179185 \
                    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.11.1 \
                        rmd160  d6dec631a506398b8b731a0476b9e44c206243ac \
                        sha256  759279b90772bfc79db1620874f45eb008aceab35b14f007cb4ab8316a2398db \
                        size    116867 \
                    github.com/stretchr/objx \
                        lock    v0.5.2 \
                        rmd160  96ffcde8897243df89c8da1084cb84c90eb72676 \
                        sha256  39661f2a3eb998c52776126d166556a804fa18bf7e2d7e4dc73e20cd25d3145c \
                        size    33242 \
                    github.com/spf13/viper \
                        lock    v1.21.0 \
                        rmd160  46819f217f838f1e5b3cf75fa9c80a6721c4f064 \
                        sha256  468a7844ec08b82e0b82187b31a340ec369a63c52eaeccc32c0e25690335e987 \
                        size    122030 \
                    github.com/spf13/pflag \
                        lock    v1.0.10 \
                        rmd160  eb2e68c61d88ce1e22cf4b75b31de9815ee375b5 \
                        sha256  8e29e9893c782030a639e4e1ff4442cef352fa54b64aaa11c35163d550ce10dd \
                        size    63166 \
                    github.com/spf13/cobra \
                        lock    v1.10.1 \
                        rmd160  165b05b402eacf15388d28142faf4c5c112eea5e \
                        sha256  60cf494a9a48b9a7f43426c6923f431943b40ddd4fe555090209e68873bf251d \
                        size    200687 \
                    github.com/spf13/cast \
                        lock    v1.10.0 \
                        rmd160  35f8a183f86e8dd1efd3c7f644ebcd92c8381b03 \
                        sha256  dd33410713e819171521d94c8588776c11934b25a94ba0306d4e46f8d7ba7d2d \
                        size    24181 \
                    github.com/spf13/afero \
                        lock    v1.15.0 \
                        rmd160  1dd03d94a671ce5511fee348496eda76fe730fe3 \
                        sha256  a7af413dee27d418f1caabe2a3be5eb8245d9de3874d680e923e487b0fd6c43f \
                        size    95836 \
                    github.com/sourcegraph/conc \
                        lock    5f936abd7ae8 \
                        rmd160  31c3404558cb5b3df433d1f3b1f52f4aa500c2a7 \
                        sha256  5e81a1d3b94e86f389ee16cfd61ff63406df4dcc08003df68a3bf2618a48411b \
                        size    24954 \
                    github.com/sorairolake/lzip-go \
                        lock    v0.3.8 \
                        rmd160  a612e327fa668029010b50bf3a0f15a589f79625 \
                        sha256  f7bc70151de38b9778b6e5c5818d84f7cd591ceba4c6087489b450a13614bde3 \
                        size    63218 \
                    github.com/shirou/gopsutil \
                        lock    v4.25.10 \
                        rmd160  f26dfebc1f4d13c7508a49b471a330227f74cc15 \
                        sha256  00ec932c126403336246ab942c339606c501f87b9bdba716595bbb40f2c04588 \
                        size    193871 \
                    github.com/samber/lo \
                        lock    v1.52.0 \
                        rmd160  4a25ab032462c87f26ec1c975746f857db4ea63e \
                        sha256  5b45d80552423eefac6e6c177de655eb2d31fa87cdf047e893169c50c0c4b57a \
                        size    93926 \
                    github.com/sagikazarmark/locafero \
                        lock    v0.11.0 \
                        rmd160  d7a86ab29bd17dc5203f9cf2e96182d7ab8c8199 \
                        sha256  1a0dd29f1088592c9de5860e4dca10aafed7a87a820b5b070bc1fe83942429c6 \
                        size    10100 \
                    github.com/russross/blackfriday \
                        lock    v2.1.0 \
                        rmd160  c42a9332a2c2f3074c6f7e8d37a58d6148d2af08 \
                        sha256  c4df56f2012a7d16471418245e78b5790569e27bbe8d72a860d7117a801a7fae \
                        size    92950 \
                    github.com/rogpeppe/go-internal \
                        lock    v1.9.0 \
                        rmd160  acb8f644e5634bdae632cdb61ea736422aeb88f0 \
                        sha256  65b0852e5c78fa920fef2176fa17180bf1f7f32a1163baacb44c2aa480845a16 \
                        size    133682 \
                    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.2.0 \
                        rmd160  1be41a2b1aedd425a7d2dbd6edfd587047818b8f \
                        sha256  5b2f8ebbea668026fb5a2b74b66619be2a4c983d934eba21aafac42e1e73c5c4 \
                        size    43088 \
                    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.5 \
                        rmd160  25cacaff083dce31f1eff63147d866b504c2fb10 \
                        sha256  a62233927ae33817bb43cfdd925af0099960416925e26e9433e4a048feace3fd \
                        size    69853 \
                    github.com/marusama/semaphore \
                        lock    v2.5.0 \
                        rmd160  9335f483b0ea9582971a2ab5c962bc5f222c6e6b \
                        sha256  ef9e467334fbd0aa5411f6c193c855e25335b4abd34648fde67348171b68a4c0 \
                        size    6840 \
                    github.com/maruel/natural \
                        lock    v1.2.1 \
                        rmd160  00f96682ee6127c33da9eb1b4c5f4e707ceceab1 \
                        sha256  ef6fab656556232ac5a0071b5956bb40c5aa907c3c65cbc9f0f8432ebbcba0da \
                        size    9436 \
                    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.3.3 \
                        rmd160  44fed0d95147da951b52df0248141f1d059d8ba6 \
                        sha256  3ce6f97ad7ec0b9b5681f983dcc714ace9d2eda4decb1a3e5e08b3799ec286e7 \
                        size    315440 \
                    github.com/golang/geo \
                        lock    c5087ca84cf4 \
                        rmd160  e2c84c382ca24ce9319a7e180e5b90fcaada8f84 \
                        sha256  f9a224b9e7af869263b236b1c8dec96f3638e744ed2e47dea9780c567993d5bf \
                        size    439732 \
                    github.com/golang-jwt/jwt \
                        lock    v5.3.0 \
                        rmd160  2faf6955f09324b37dbd2ae10069a60a4965f42e \
                        sha256  a659306ccfcc94c9c98dc30884346d6a687490a10976158ce898e7f91ac20431 \
                        size    62016 \
                    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/ebitengine/purego \
                        lock    v0.9.0 \
                        rmd160  af3a699e55d6fee917912161901fc8a9c78d793e \
                        sha256  efa0a3fdfaefd1b699c34c98a4ab03703b445d915ae12d7471d2056cec506a43 \
                        size    86524 \
                    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/cpuguy83/go-md2man \
                        lock    v2.0.6 \
                        rmd160  f1a0f3ea4b3327a78aa1e69feb4fe31360b05ae8 \
                        sha256  e13c0173838f14f1105d738546ec16269aea36953411d4ff2c53e3b644e58f29 \
                        size    11075 \
                    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.38.0 \
                        rmd160  8c15325f86b0cb31a97b36c3a68a749b896fde72 \
                        sha256  5857e944144fdebb74a5066cc82208fbeaaebeca20558c5a0ac79217d3dabcd1 \
                        size    69311 \
                    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
# Add a repo line for go.yaml.in/yaml: github.com/yaml/go-yaml

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.
    "
}
