]> git.pld-linux.org Git - SPECS.git/blob - goimapnotify.spec
SPECS updated Tue 30 Apr 20:27:01 CEST 2024
[SPECS.git] / goimapnotify.spec
1 %define         vendor_version  2.3.7
2
3 Summary:        Execute scripts on IMAP mailbox changes using IDLE
4 Name:           goimapnotify
5 Version:        2.3.15
6 Release:        1
7 License:        GPL v3+
8 Group:          Applications/Networking
9 Source0:        https://gitlab.com/shackra/goimapnotify/-/archive/%{version}/%{name}-%{version}.tar.bz2
10 # Source0-md5:  da45f0a6cfa310128d20e8491e1a7789
11 # cd goimapnotify-%{version}
12 # go mod vendor
13 # cd ..
14 # tar cJf goimapnotify-vendor-%{version}.tar.xz goimapnotify-%{version}/vendor
15 Source1:        %{name}-vendor-%{vendor_version}.tar.xz
16 # Source1-md5:  56594c09b58987171333fb4a6fb2e1a8
17 URL:            https://gitlab.com/shackra/goimapnotify
18 BuildRequires:  golang >= 1.15
19 BuildRequires:  rpmbuild(macros) >= 2.009
20 BuildRequires:  tar >= 1:1.22
21 BuildRequires:  xz
22 Requires:       systemd-units >= 38
23 ExclusiveArch:  %go_arches
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %define         _debugsource_packages   0
27
28 %description
29 Execute scripts on IMAP mailbox changes (new/deleted/updated messages)
30 using IDLE, golang version.
31
32 %prep
33 %setup -q -a1
34
35 %{__mv} %{name}-%{vendor_version}/vendor .
36
37 %{__mkdir_p} .go-cache
38
39 %build
40 %__go build -v -mod=vendor -o target/%{name}
41
42 %install
43 rm -rf $RPM_BUILD_ROOT
44
45 install -d $RPM_BUILD_ROOT{%{_bindir},%{systemduserunitdir}}
46
47 cp -p target/%{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
48 sed -e 's@/usr/bin/goimapnotify@%{_bindir}/goimapnotify@'  goimapnotify@.service > $RPM_BUILD_ROOT%{systemduserunitdir}/goimapnotify@.service
49
50 %clean
51 rm -rf $RPM_BUILD_ROOT
52
53 %files
54 %defattr(644,root,root,755)
55 %doc CHANGELOG.md README.md
56 %attr(755,root,root) %{_bindir}/%{name}
57 %{systemduserunitdir}/goimapnotify@.service
This page took 0.068119 seconds and 3 git commands to generate.