Skip to content

Commit b049a8f

Browse files
committed
Add manpage for sqlpage binary to DEB and RPM packages
1 parent b9d36c5 commit b049a8f

File tree

3 files changed

+92
-0
lines changed

3 files changed

+92
-0
lines changed

debian/rules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ override_dh_auto_test:
2222
override_dh_auto_install:
2323
install -D -m 755 target/$(CARGO_PROFILE)/sqlpage $(CURDIR)/debian/sqlpage/usr/bin/sqlpage
2424
install -D -m 644 sqlpage.service $(CURDIR)/debian/sqlpage/lib/systemd/system/sqlpage.service
25+
install -D -m 644 sqlpage.1 $(CURDIR)/debian/sqlpage/usr/share/man/man1/sqlpage.1
2526
install -d $(CURDIR)/debian/sqlpage/etc/sqlpage
2627
install -d $(CURDIR)/debian/sqlpage/var/www/sqlpage
2728
install -D -m 644 sqlpage/sqlpage.json $(CURDIR)/debian/sqlpage/etc/sqlpage/sqlpage.json

rpm/sqlpage.spec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ install -D -m 755 target/superoptimized/sqlpage %{buildroot}%{_bindir}/sqlpage
5757
# Install systemd service
5858
install -D -m 644 debian/sqlpage.service %{buildroot}%{_unitdir}/sqlpage.service
5959

60+
# Install manpage
61+
install -D -m 644 sqlpage.1 %{buildroot}%{_mandir}/man1/sqlpage.1
62+
6063
# Install configuration and data files
6164
install -d %{buildroot}%{_sysconfdir}/sqlpage
6265
install -d %{buildroot}%{_sharedstatedir}/sqlpage
@@ -111,6 +114,7 @@ fi
111114
%doc README.md CHANGELOG.md
112115
%{_bindir}/sqlpage
113116
%{_unitdir}/sqlpage.service
117+
%{_mandir}/man1/sqlpage.1*
114118
%dir %{_sysconfdir}/sqlpage
115119
%config(noreplace) %{_sysconfdir}/sqlpage/sqlpage.json
116120
%{_sysconfdir}/sqlpage/templates/

sqlpage.1

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
.TH SQLPAGE 1 "October 2025" "SQLPage 0.38.0" "User Commands"
2+
.SH NAME
3+
sqlpage \- SQL-only webapp builder and web server
4+
.SH SYNOPSIS
5+
.B sqlpage
6+
[\fIOPTIONS\fR]
7+
.SH DESCRIPTION
8+
.B SQLPage
9+
is a web server that takes .sql files and formats the query results using
10+
pre-made configurable professional-looking components.
11+
.PP
12+
With SQLPage, you write simple .sql files containing queries to your database
13+
to select, group, update, insert, and delete your data, and you get
14+
good-looking clean webpages displaying your data as text, lists, grids, plots,
15+
and forms.
16+
.PP
17+
Supported databases include SQLite, PostgreSQL, MySQL, Microsoft SQL Server,
18+
and any ODBC-compatible database such as ClickHouse, MongoDB, DuckDB, Oracle,
19+
Snowflake, BigQuery, and IBM DB2.
20+
.SH OPTIONS
21+
.TP
22+
.BR \-\-version
23+
Display version information and exit.
24+
.TP
25+
.BR \-\-help
26+
Display help information and exit.
27+
.TP
28+
.BR \-\-config\-file =\fIPATH\fR
29+
Specify a custom configuration file path. If not specified, SQLPage will look
30+
for sqlpage.json in the current directory or in the configuration directory.
31+
.SH ENVIRONMENT
32+
.TP
33+
.B SQLPAGE_CONFIGURATION_DIRECTORY
34+
Directory containing SQLPage configuration files. Defaults to /etc/sqlpage for
35+
system installations.
36+
.TP
37+
.B SQLPAGE_WEB_ROOT
38+
Directory containing .sql files to serve. Defaults to the current working
39+
directory or /var/www/sqlpage for system installations.
40+
.TP
41+
.B DATABASE_URL
42+
Database connection string. Can also be specified in the configuration file.
43+
.SH FILES
44+
.TP
45+
.I /etc/sqlpage/sqlpage.json
46+
System-wide configuration file.
47+
.TP
48+
.I /etc/sqlpage/templates/
49+
Directory containing Handlebars templates for components.
50+
.TP
51+
.I /var/www/sqlpage/
52+
Default web root directory for .sql files.
53+
.TP
54+
.I /var/log/sqlpage/
55+
Log file directory when running as a system service.
56+
.SH EXAMPLES
57+
.PP
58+
Start SQLPage in the current directory:
59+
.RS
60+
.B sqlpage
61+
.RE
62+
.PP
63+
Start SQLPage with a custom configuration file:
64+
.RS
65+
.B sqlpage \-\-config\-file=/path/to/config.json
66+
.RE
67+
.SH EXIT STATUS
68+
.TP
69+
.B 0
70+
Successful program execution.
71+
.TP
72+
.B 1
73+
An error occurred.
74+
.SH SEE ALSO
75+
Full documentation available at:
76+
.UR https://sql\-page.com
77+
.UE
78+
.PP
79+
GitHub repository:
80+
.UR https://github.com/sqlpage/SQLPage
81+
.UE
82+
.SH AUTHOR
83+
SQLPage Contributors <sqlpage@sql\-page.com>
84+
.SH COPYRIGHT
85+
Copyright \(co 2023-2025 SQLPage Contributors.
86+
.br
87+
License: MIT License

0 commit comments

Comments
 (0)