-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstackage-dist.rpm.spec
More file actions
81 lines (61 loc) · 1.83 KB
/
stackage-dist.rpm.spec
File metadata and controls
81 lines (61 loc) · 1.83 KB
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
Name: @@PKG_NAME@@
Version: @@PKG_VERSION@@
Release: @@PKG_RELEASE@@%{?dist}
Summary: Asset package for Stackage
Group: System Environment/Development Tools
License: BSD
URL: https://www.stackage.org
Source0: stack-bin.gz
Source1: stack-root-download-cache.tar.gz
Source2: stack-root-indices.tar.gz
Source3: helpers.sh
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%description
%global debug_package %{nil}
%package indices
Summary: Asset package for Stackage (Hackage indices only)
Requires: %name
BuildArch: noarch
%description indices
Asset package for Stackage (Hackage indices only)
%package stack
Summary: Asset package for Stackage (Stack binary)
Requires: %name
%if 0%{?fedora} >= 24
# GHC builds need tinfo.so.5
Requires: ncurses-compat-libs
%endif
%description stack
Asset package for Stackage (Stack binary)
%package downloads
Summary: Asset package for Stackage (All downloads)
Requires: %name
%description downloads
Asset package for Stackage (All downloads)
%prep
unpack_root=$(pwd)
mkdir -p ${unpack_root}/.stack
cd ${unpack_root}/.stack
mkdir bin
zcat %{_sourcedir}/stack-bin.gz > bin/stack
chmod a+x bin/stack
tar -zxf %{_sourcedir}/stack-root-download-cache.tar.gz
tar -zxf %{_sourcedir}/stack-root-indices.tar.gz
%build
unpack_root=$(pwd)
export STACK_ROOT=
%install
unpack_root=$(pwd)
STACKAGE_DIST_ROOT=$RPM_BUILD_ROOT/%{_prefix}/%{_lib}/%name
mkdir -p ${STACKAGE_DIST_ROOT}/
cp -a %{_sourcedir}/helpers.sh ${STACKAGE_DIST_ROOT}/
mv ${unpack_root}/.stack/* ${STACKAGE_DIST_ROOT}/
%files
%{_prefix}/%{_lib}/%name/helpers.sh
%files downloads
%{_prefix}/%{_lib}/%name/download-cache*
%files stack
%{_prefix}/%{_lib}/%name/bin/stack
%files indices
%{_prefix}/%{_lib}/%name/indices*
%changelog