]> git.pld-linux.org Git - packages/onedrive.git/blob - onedrive.spec
- add systemd user service startup, rel 3
[packages/onedrive.git] / onedrive.spec
1 Summary:        OneDrive Free Client written in D
2 Name:           onedrive
3 Version:        2.4.13
4 Release:        3
5 License:        GPL v3
6 Source0:        https://github.com/abraunegg/onedrive/archive/v%{version}/%{name}-v%{version}.tar.gz
7 # Source0-md5:  18d5f1af56f7e3118e2dd00ad75bc8fa
8 URL:            https://github.com/abraunegg/onedrive
9 BuildRequires:  autoconf
10 BuildRequires:  automake
11 BuildRequires:  curl-devel
12 BuildRequires:  ldc
13 BuildRequires:  libnotify-devel
14 BuildRequires:  sqlite-devel
15 BuildRequires:  systemd-devel
16 BuildRequires:  rpmbuild(macros) >= 2.011
17 Requires(post,preun):   systemd-units >= 1:250.1
18 Requires:       systemd-units >= 1:250.1
19 ExclusiveArch:  %{x8664}
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 Free CLI client for Microsoft OneDrive written in D.
24
25 %prep
26 %setup -q
27 sed -i 's/-o root -g users//g' Makefile.in
28 sed -i 's/-o root -g root//g' Makefile.in
29 # sed -i '/git/d' Makefile
30 sed -i "s|std\.c\.|core\.stdc\.|" src/sqlite.d
31 echo %{version} > version
32
33 %build
34 %{__aclocal}
35 %{__autoconf}
36 bash %configure
37 export DFLAGS="%{_d_optflags}"
38 export PREFIX="%{_prefix}"
39 %{__make} DC=ldmd2
40
41 %install
42 rm -rf $RPM_BUILD_ROOT
43 %{__make} install \
44     PREFIX="%{_prefix}" \
45         DESTDIR=$RPM_BUILD_ROOT
46
47 chmod a-x $RPM_BUILD_ROOT%{_mandir}/man1/%{name}*
48
49 %clean
50 rm -rf $RPM_BUILD_ROOT
51
52 %post
53 %systemd_user_post %{name}.service
54
55 %preun
56 %systemd_user_preun %{name}.service
57
58 %files
59 %defattr(644,root,root,755)
60 %doc README.md LICENSE CHANGELOG.md
61 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/onedrive
62 %attr(755,root,root) %{_bindir}/%{name}
63 %{systemduserunitdir}/%{name}.service
64 %{systemdunitdir}/%{name}@.service
65 %{_mandir}/man1/%{name}.1*
66 %{_docdir}/%{name}
This page took 0.265646 seconds and 3 git commands to generate.