-
Notifications
You must be signed in to change notification settings - Fork 0
/
cudaminer.spec
93 lines (72 loc) · 2.54 KB
/
cudaminer.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
Name: cudaminer
Version: 2014.02.28
Release: 1%{?dist}
Summary: CUDA accelerated mining application for AltCoins
%define dashver %(echo %{version} | tr . -)
License: GPLv3
URL: https://github.com/cbuchner1/CudaMiner
Source0: https://github.com/cbuchner1/CudaMiner/archive/%{dashver}.tar.gz#/%{name}-%{version}.tar.gz
Source1: %{name}.service
Source2: %{name}.sysconfig
ExclusiveArch: x86_64
# The space-cadets at nVidia have libcudart.so dynamically loading
# libcuda.so (unversioned) in a way that is not normal dynamic linking.
# As Fedora's xorg-x11-drv-nvidia only contains libcuda.so.1, we
# have to hard-depend on xorg-x11-drv-nvidia-devel for the unversioned
# libcuda.so file to exist at runtime
Requires: xorg-x11-drv-nvidia-devel
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
BuildRequires: systemd
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libcurl-devel
BuildRequires: openssl-devel
BuildRequires: cuda-core-5-5
BuildRequires: cuda-headers-5-5
BuildRequires: cuda-core-libs-5-5
%description
CudaMiner is a CUDA accelerating mining application for AltCoin
mining with nVidia cards.
%prep
%setup -q -n CudaMiner-%(echo %{version} | tr . -)
%build
# nvcc doesn't support pipe, which gets aggressively injected everywhere
# substitute our own lame cflags
RPM_OPT_FLAGS=${RPM_OPT_FLAGS/-pipe}
export RPM_OPT_FLAGS
export CFLAGS=-O3
export CXXFLAGS=-O3
# the included configure script is jacked in various ways, regenerate it
./autogen.sh
%configure --with-cuda=/usr/local/cuda-5.5
make %{?_smp_mflags} LIBS=-Wl,-rpath,/usr/local/cuda-5.5/lib64
%install
%make_install
install -D -m644 -p %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
install -D -m644 -p %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
%pre
getent group %{name} >/dev/null || groupadd -r %{name}
getent passwd %{name} >/dev/null ||
useradd -r -g %{name} -s /sbin/nologin \
-c "%{name} daemon" %{name}
exit 0
%post
%systemd_post %{name}.service
%preun
%systemd_preun %{name}.service
%postun
%systemd_postun_with_restart %{name}.service
%files
%doc README.txt LICENSE.txt ChangeLog
%{_bindir}/%{name}
%{_unitdir}/%{name}.service
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%changelog
* Sun Mar 16 2014 Graham Forest <[email protected]> 2014.02.28-1
- Version bump
- Fix source URL for spectool
- ExclusiveArch x86_64, as there's no cuda repo for i386
* Sat Feb 22 2014 Graham Forest <[email protected]> 2014.02.18-1
- Initial package