Skip to content

Commit 9d7df77

Browse files
committed
for rpmautospec [skip changelog]
1 parent 5f3a4a8 commit 9d7df77

File tree

2 files changed

+127
-0
lines changed

2 files changed

+127
-0
lines changed

artalk.spec

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
%global goipath github.com/artalkjs/artalk/v2
2+
Version: 2.9.1
3+
%gometa -f
4+
Name: artalk
5+
Release: %autorelease
6+
Summary: A Self-hosted Comment System
7+
License: MIT
8+
URL: https://artalk.js.org/
9+
Source0: %{name}-%{version}-vendored.tar.gz
10+
# track this script
11+
Source1: vendor-tarball.sh
12+
Source2: https://github.com/ArtalkJS/Artalk/releases/download/v%{version}/artalk_ui.tar.gz
13+
Source3: artalk.sysusers
14+
Source4: artalk.service
15+
Patch1: 0001-fix-go-test-ld-undefined-error-by-remove-clickhouse.patch
16+
Patch2: 0002-remove-upgrade-command.patch
17+
BuildRequires: systemd-rpm-macros
18+
%{?systemd_requires}
19+
%{?sysusers_requires_compat}
20+
21+
22+
%description
23+
Artalk is an intuitive yet feature-rich comment system, ready for immediate deployment into any blog, website, or web application.
24+
25+
26+
%gopkg
27+
28+
29+
%prep
30+
%autosetup -p1
31+
tar --strip-components=1 -xzf %{SOURCE2} --directory=public
32+
%goprep -k -e
33+
chmod -Rf a+rX,u+w,g-w,o-w .
34+
35+
36+
%build
37+
%gobuild -o %{gobuilddir}/bin/artalk %{goipath}
38+
39+
40+
%install
41+
%gopkginstall
42+
43+
# command
44+
install -m 0755 -vd %{buildroot}%{_bindir}
45+
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
46+
47+
# sysusers
48+
install -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysusersdir}/%{name}.conf
49+
50+
# data directory (work dir)
51+
install -d -m 0750 %{buildroot}%{_sharedstatedir}/artalk
52+
53+
# config
54+
install -D -p -m 0644 ./conf/artalk.example.yml %{buildroot}%{_sysconfdir}/artalk/artalk.yml
55+
56+
# systemd units
57+
install -D -p -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/artalk.service
58+
59+
60+
%check
61+
%gocheck
62+
63+
64+
%pre
65+
%sysusers_create_compat %{SOURCE3}
66+
67+
68+
%post
69+
%systemd_post artalk.service
70+
71+
72+
%preun
73+
%systemd_preun artalk.service
74+
75+
76+
%postun
77+
%systemd_postun_with_restart artalk.service
78+
79+
80+
%files
81+
%doc CONTRIBUTING.md README.md
82+
%license LICENSE
83+
%{_bindir}/artalk
84+
%{_unitdir}/artalk.service
85+
%{_sysusersdir}/%{name}.conf
86+
%dir %{_sysconfdir}/artalk
87+
%config(noreplace) %{_sysconfdir}/artalk/artalk.yml
88+
%attr(0750,artalk,artalk) %dir %{_sharedstatedir}/artalk
89+
90+
91+
%gopkgfiles
92+
93+
94+
%changelog
95+
%autochangelog

changelog

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
* Wed Oct 02 2024 duli <duli4868@gmail.com> - 2.9.1-11
2+
- improve vendor-tarball.sh to make it reproducible
3+
4+
* Wed Oct 02 2024 duli <duli4868@gmail.com> - 2.9.1-10
5+
- remove upgrade command
6+
7+
* Wed Oct 02 2024 duli <duli4868@gmail.com> - 2.9.1-9
8+
- add package testing
9+
10+
* Wed Oct 02 2024 duli <duli4868@gmail.com> - 2.9.1-8
11+
- reuse %%gobuild instead of go build -mod=vendor
12+
13+
* Wed Oct 02 2024 duli <duli4868@gmail.com> - 2.9.1-7
14+
- change the way vendor artalk
15+
16+
* Tue Oct 01 2024 duli <duli4868@gmail.com> - 2.9.1-6
17+
- reorganize spec file
18+
19+
* Tue Oct 01 2024 duli <duli4868@gmail.com> - 2.9.1-5
20+
- add systemd service
21+
22+
* Tue Oct 01 2024 duli <duli4868@gmail.com> - 2.9.1-4
23+
- add config file
24+
25+
* Tue Oct 01 2024 duli <duli4868@gmail.com> - 2.9.1-3
26+
- fix: ui files lack
27+
28+
* Tue Oct 01 2024 duli <duli4868@gmail.com> - 2.9.1-2
29+
- add artalk user and group
30+
31+
* Mon Sep 30 2024 duli <duli4868@gmail.com> - 2.9.1-1
32+
- initial commit

0 commit comments

Comments
 (0)