Ravenports generated: 22 Sep 2023 21:25
[ravenports.git] / bucket_64 / forgejo
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               forgejo
4 VERSION=                1.20.4-1
5 KEYWORDS=               www
6 VARIANTS=               standard
7 SDESC[standard]=        Painless, self-hosted Git service (GitHub-like)
8 HOMEPAGE=               https://forgejo.org/
9 CONTACT=                Michael_Reim[kraileth@elderlinux.org]
10
11 DOWNLOAD_GROUPS=        main bundles
12 SITES[main]=            https://codeberg.org/forgejo/forgejo/releases/download/v1.20.4-1/
13 DISTFILE[1]=            forgejo-src-1.20.4-1.tar.gz:main
14 DF_INDEX=               1
15 SPKGS[standard]=        single
16
17 OPTIONS_AVAILABLE=      none
18 OPTIONS_STANDARD=       none
19
20 BUILD_DEPENDS=          golang:single:standard
21 RUN_DEPENDS=            git-lfs:single:standard
22
23 USERS=                  forgejo
24 GROUPS=                 forgejo
25 USERGROUP_SPKG=         single
26
27 USES=                   gmake
28
29 DISTNAME=               forgejo-src-1.20.4-1
30
31 LICENSE=                MIT:single
32 LICENSE_FILE=           MIT:{{WRKSRC}}/LICENSE
33 LICENSE_SCHEME=         solo
34
35 MAKE_ENV=               GOFLAGS="-mod=vendor"
36                         GOBIN="{{WRKDIR}}/bin"
37                         TAGS="bindata sqlite sqlite_unlock_notify"
38
39 INSTALL_REQ_TOOLCHAIN=  yes
40 RC_SUBR=                forgejo:single
41 SUB_FILES=              app.ini.sample
42                         pkg-message-single
43 SUB_LIST=               GITUSER=forgejo
44
45 do-build:
46         (cd ${WRKSRC} && \
47         ${SETENV} ${MAKE_ENV} go build . )
48
49 post-install:
50         ${INSTALL_PROGRAM} ${WRKDIR}/bin/gitea ${STAGEDIR}${PREFIX}/bin
51         ${LN} -s ${PREFIX}/bin/gitea ${STAGEDIR}${PREFIX}/bin/forgejo
52         ${MKDIR} ${STAGEDIR}${PREFIX}/etc/forgejo/conf
53         ${INSTALL_DATA} ${WRKSRC}/custom/conf/app.example.ini ${STAGEDIR}${PREFIX}/etc/forgejo/conf/app.ini.examples
54         ${INSTALL_DATA} ${WRKDIR}/app.ini.sample ${STAGEDIR}${PREFIX}/etc/forgejo/conf/app.ini.sample
55
56 post-extract:
57         ${ECHO_CMD} 1.20.4-1 > ${WRKSRC}/VERSION
58
59 [FILE:524:descriptions/desc.single]
60 Forgejo is a self-hosted lightweight software forge written in Go. Easy to 
61 install and low maintenance, it just does the job if you're looking for an 
62 alternative to GitHub.
63
64 It is currently a "soft" fork of Gitea which is a fork of Gogs. Forgejo 
65 was started by members of the Gitea community who were unhappy that the 
66 leaders founded a for-profit company and acted rather intransparently in 
67 that regard. Other than being guaranteed to always remain Free Software, 
68 it puts its focus on scaling, federation and privacy.
69
70
71 [FILE:106:distinfo]
72 732281d0f31d284499fd2a3708bd06250a7cfdad422e07886adb67a195881910     55536581 forgejo-src-1.20.4-1.tar.gz
73
74
75 [FILE:95:manifests/plist.single]
76 @sample etc/forgejo/conf/app.ini.sample
77 bin/
78  forgejo
79  gitea
80 etc/forgejo/conf/app.ini.examples
81
82
83 [FILE:2653:files/app.ini.sample.in]
84 #
85 # Sample Configuration for Forgejo using SQLite
86 #
87 # For information on the available settings, consult the online
88 # documentation, or see the accompanying file app.ini.examples, which
89 # contains the settings incorporated into the gitea binary.
90 #
91 # This sample configuration runs Forgejo with a local database.  Before
92 # running this configuration, make sure to change the INTERNAL_TOKEN,
93 # JWT_SECRET, and SECRET_KEY variables.  SECRET_KEY is a password of your
94 # choosing, INTERNAL_TOKEN is a 64-byte random number in BASE64 encoding,
95 # JWT_SECRET is a 32-byte random number in BASE64 encoding.
96
97 # You can generate the token using for example:
98 #   openssl rand -base64 64
99
100 # You can let Forgejo add these to the config for you; you need to make
101 # app.ini writeable by the configured user (default: forgejo).
102 #
103 # There are no pre-configured users; the first user to register becomes an
104 # admin.  In this sample configuration, the HTTP server only listens on
105 # localhost.
106 #
107 # If you'd rather use the web-based installer, remove this conf/app.ini file
108 # and make %%PREFIX%%/etc/forgejo/conf writeable to the configured user.
109
110 APP_NAME = Gitea: Git with a cup of tea
111 RUN_USER = %%GITUSER%%
112 RUN_MODE = prod
113
114 [database]
115 DB_TYPE  = sqlite3
116 HOST     = 127.0.0.1:3306
117 NAME     = forgejo
118 PASSWD   = 
119 PATH     = /var/db/forgejo/forgejo.db
120 SSL_MODE = disable
121 USER     = root
122
123 [indexer]
124 ISSUE_INDEXER_PATH = /var/db/forgejo/indexers/issues.bleve
125
126 [log]
127 ROOT_PATH = /var/log/forgejo
128 MODE      = file
129 LEVEL     = Info
130
131 [mailer]
132 ENABLED = false
133
134 [oauth2]
135 JWT_SECRET = D56bmu6xCtEKs9vKKgMKnsa4X9FDwo64HVyaS4fQ4mY
136
137 [picture]
138 AVATAR_UPLOAD_PATH      = /var/db/forgejo/data/avatars
139 DISABLE_GRAVATAR        = false
140 ENABLE_FEDERATED_AVATAR = false
141
142 [repository]
143 ROOT = /var/db/forgejo/forgejo-repositories
144 # Forgejo's default is 'bash', so if you have bash installed, you can comment
145 # this out.
146 SCRIPT_TYPE = sh
147
148 [repository.upload]
149 TEMP_PATH = /var/db/forgejo/data/tmp/uploads
150
151 [security]
152 INSTALL_LOCK = true
153 INTERNAL_TOKEN = 1FFhAklka01JhgJTRUrFujWYiv4ijqcTIfXJ9o4n1fWxz+XVQdXhrqDTlsnD7fvz7gugdhgkx0FY2Lx6IBdPQw==
154 SECRET_KEY   = ChangeMeBeforeRunning
155
156 [session]
157 PROVIDER = file
158 PROVIDER_CONFIG = /var/db/forgejo/data/sessions
159
160 [server]
161 DOMAIN       = localhost
162 HTTP_ADDR    = 127.0.0.1
163 HTTP_PORT    = 3000
164 ROOT_URL     = http://localhost:3000/
165 DISABLE_SSH  = false
166 SSH_DOMAIN   = %(DOMAIN)s
167 SSH_PORT     = 22
168 OFFLINE_MODE = false
169 APP_DATA_PATH = /var/db/forgejo/data
170
171 [service]
172 REGISTER_EMAIL_CONFIRM = false
173 ENABLE_NOTIFY_MAIL     = false
174 DISABLE_REGISTRATION   = false
175 ENABLE_CAPTCHA         = true
176 REQUIRE_SIGNIN_VIEW    = false
177
178 [git]
179 PATH = %%PREFIX%%/bin/git
180
181
182 [FILE:1050:files/forgejo.in]
183 #!/bin/sh
184
185 # PROVIDE: forgejo
186 # REQUIRE: NETWORKING SYSLOG
187 # KEYWORD: shutdown
188 #
189 # Add the following lines to /etc/rc.conf to enable forgejo:
190 #
191 #forgejo_enable="YES"
192
193 . /etc/rc.subr
194
195 name="forgejo"
196 rcvar="forgejo_enable"
197
198 load_rc_config $name
199
200 : ${forgejo_user:="%%GITUSER%%"}
201 : ${forgejo_enable:="NO"}
202 : ${forgejo_facility:="daemon"}
203 : ${forgejo_priority:="debug"}
204 : ${forgejo_shared:="%%PREFIX%%/share/${name}"}
205 : ${forgejo_custom:="%%PREFIX%%/etc/${name}"}
206
207 command="%%PREFIX%%/bin/${name} web"
208 procname="%%PREFIX%%/bin/${name}"
209 githome="$(eval echo ~${forgejo_user})"
210
211 pidfile="/var/run/${name}.pid"
212
213 start_cmd="${name}_start"
214
215 forgejo_start() {
216         for d in /var/db/forgejo /var/log/forgejo; do
217                 if [ ! -e "$d" ]; then
218                         mkdir "$d"
219                         chown ${forgejo_user} "$d"
220                 fi
221         done
222         /usr/sbin/daemon -f \
223                 -u ${forgejo_user} -p ${pidfile} \
224                 /usr/bin/env -i \
225                 "GITEA_WORK_DIR=${forgejo_shared}" \
226                 "GITEA_CUSTOM=${forgejo_custom}" \
227                 "HOME=${githome}" \
228                 "PATH=%%PREFIX%%/bin:${PATH}" \
229                 "USER=${forgejo_user}" \
230                 $command
231 }
232
233 run_rc_command "$1"
234
235
236 [FILE:179:files/pkg-message-single.in]
237 A sample configuration using SQLite has been installed as 
238 %%PREFIX%%/etc/forgejo/conf/app.ini. Change according to your
239 needs or use as-is to quickly get Forgejo up for testing.
240