1 | %define pkg_version 0.99.1274 |
---|
2 | %define pkg_release 1%{?_dist_release} |
---|
3 | |
---|
4 | Summary: An integrated development environment (IDE) for R |
---|
5 | Summary(ja): Rのための統合開発環境(サーバ版) |
---|
6 | Name: rstudio-server |
---|
7 | Version: %{pkg_version} |
---|
8 | Release: %{pkg_release} |
---|
9 | |
---|
10 | License: AGPLv3 |
---|
11 | Group: Applications/Edutainment |
---|
12 | URL: https://www.rstudio.com/ |
---|
13 | Source0: rstudio-%{version}.tar.gz |
---|
14 | Source1: rserver.conf |
---|
15 | Source2: rsession.conf |
---|
16 | |
---|
17 | Source11: core-dictionaries.zip |
---|
18 | Source12: mathjax-26.zip |
---|
19 | Source13: rsconnect_0.4.3.tar.gz |
---|
20 | Source14: rmarkdown_1.0.9002.tar.gz |
---|
21 | |
---|
22 | # patch to avoid download necessary files |
---|
23 | Patch1: dependencies_common.patch |
---|
24 | # patches to use system pandoc |
---|
25 | Patch2: rsession-dev.conf.patch |
---|
26 | Patch3: SessionOptions.cpp.patch |
---|
27 | Patch4: session_CMakeLists.txt.patch |
---|
28 | |
---|
29 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
30 | |
---|
31 | BuildRequires: rstudio-gwt |
---|
32 | BuildRequires: rstudio-chromedriver |
---|
33 | BuildRequires: cmake >= 2.8 |
---|
34 | BuildRequires: R >= 2.11.1 |
---|
35 | BuildRequires: pandoc pandoc-citeproc |
---|
36 | BuildRequires: java-1.7.0-openjdk-devel |
---|
37 | BuildRequires: ant |
---|
38 | BuildRequires: xml-commons-apis |
---|
39 | BuildRequires: libuuid-devel |
---|
40 | BuildRequires: openssl-devel |
---|
41 | BuildRequires: pam-devel |
---|
42 | BuildRequires: pango-devel |
---|
43 | BuildRequires: bzip2-devel zlib-devel |
---|
44 | BuildRequires: libboost-devel >= 1.50 |
---|
45 | BuildRequires: libboost >= 1.50 |
---|
46 | BuildRequires: libboost-atomic >= 1.50 |
---|
47 | BuildRequires: libboost-date-time >= 1.50 |
---|
48 | BuildRequires: libboost-filesystem >= 1.50 |
---|
49 | BuildRequires: libboost-iostreams >= 1.50 |
---|
50 | BuildRequires: libboost-program-options >= 1.50 |
---|
51 | BuildRequires: libboost-regex >= 1.50 |
---|
52 | BuildRequires: libboost-signals >= 1.50 |
---|
53 | BuildRequires: libboost-system >= 1.50 |
---|
54 | BuildRequires: libboost-thread >= 1.50 |
---|
55 | BuildRequires: libboost-chrono >= 1.50 |
---|
56 | |
---|
57 | Requires: R >= 2.11.1 |
---|
58 | Requires: pandoc pandoc-citeproc |
---|
59 | Requires: java-1.7.0-openjdk |
---|
60 | Requires: libuuid |
---|
61 | Requires: openssl |
---|
62 | Requires: pam |
---|
63 | Requires: pango |
---|
64 | Requires: libboost >= 1.50 |
---|
65 | Requires: libboost-atomic >= 1.50 |
---|
66 | Requires: libboost-date-time >= 1.50 |
---|
67 | Requires: libboost-filesystem >= 1.50 |
---|
68 | Requires: libboost-iostreams >= 1.50 |
---|
69 | Requires: libboost-program-options >= 1.50 |
---|
70 | Requires: libboost-regex >= 1.50 |
---|
71 | Requires: libboost-signals >= 1.50 |
---|
72 | Requires: libboost-system >= 1.50 |
---|
73 | Requires: libboost-thread >= 1.50 |
---|
74 | Requires: libboost-chrono >= 1.50 |
---|
75 | |
---|
76 | Vendor: Project Vine |
---|
77 | Distribution: Vine Linux |
---|
78 | Packager: ara_t |
---|
79 | |
---|
80 | |
---|
81 | %description |
---|
82 | RStudio Server enables you to provide a browser based interface |
---|
83 | (the RStudio IDE) to a version of R running on a remote Linux server. |
---|
84 | Deploying R and RStudio on a server has a number of benefits, including: |
---|
85 | - The ability to access your R workspace from any computer in any location; |
---|
86 | Easy sharing of code, data, and other files with colleagues; |
---|
87 | - Allowing multiple users to share access to |
---|
88 | the more powerful compute resources (memory, processors, etc.) |
---|
89 | available on a well equipped server; and Centralized installation and |
---|
90 | configuration of R, R packages, TeX, and other supporting libraries. |
---|
91 | |
---|
92 | %description -l ja |
---|
93 | RStudio Serverは離れた場所にあるLinuxサーバ上で走っている |
---|
94 | Rのバージョンに対してブラウザベースのインタフェイス(the RStudio IDE) |
---|
95 | を提供します。 |
---|
96 | サーバ上にRとRStudioを配置すると以下のような数多くの利点があります: |
---|
97 | - あなたのRの作業スペースにどんな場所にあるどんなコンピュータからも |
---|
98 | アクセスできます。 |
---|
99 | 同僚とたやすくコードやデータその他のファイルを共有できます。 |
---|
100 | - 複数のユーザが十分な装備を備えたサーバ上で利用可能な、 |
---|
101 | より強力な計算資源(メモリ、CPUなど)を共有できます。 |
---|
102 | RやRパッケージ、TeXその他のサポートライブラリを集権的にインストール、 |
---|
103 | 設定することができます。 |
---|
104 | |
---|
105 | |
---|
106 | %prep |
---|
107 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
108 | %setup -q -n rstudio-%{version} |
---|
109 | %patch1 -p1 |
---|
110 | %patch2 -p1 |
---|
111 | %patch3 -p1 |
---|
112 | %patch4 -p1 |
---|
113 | |
---|
114 | %{__cp} /usr/src/rstudio-gwt/* \ |
---|
115 | %{_builddir}/rstudio-%{version}/dependencies/common |
---|
116 | %{__cp} /usr/src/rstudio-chromedriver/* \ |
---|
117 | %{_builddir}/rstudio-%{version}/dependencies/common |
---|
118 | |
---|
119 | %{__cp} \ |
---|
120 | %{SOURCE11} %{SOURCE12} \ |
---|
121 | %{_builddir}/rstudio-%{version}/dependencies/common |
---|
122 | |
---|
123 | (cd dependencies/common; |
---|
124 | sh install-gwt; |
---|
125 | sh install-dictionaries; |
---|
126 | sh install-mathjax; |
---|
127 | sh install-libclang; |
---|
128 | %{__tar} xzf %{SOURCE13} |
---|
129 | %{__tar} xzf %{SOURCE14} |
---|
130 | sh install-packages; |
---|
131 | ) |
---|
132 | |
---|
133 | cmake . \ |
---|
134 | -DRSTUDIO_TARGET=Server \ |
---|
135 | -DCMAKE_BUILD_TYPE=Release \ |
---|
136 | -DCMAKE_INSTALL_PREFIX=%{_libdir}/rstudio-server |
---|
137 | %{__make} %{?_smp_mflags} |
---|
138 | |
---|
139 | %install |
---|
140 | %{make_install} |
---|
141 | |
---|
142 | # make symbolic link |
---|
143 | %{__mkdir_p} ${RPM_BUILD_ROOT}%{_sbindir} |
---|
144 | %{__ln_s} %{_libdir}/rstudio-server/bin/rstudio-server \ |
---|
145 | ${RPM_BUILD_ROOT}%{_sbindir}/ |
---|
146 | |
---|
147 | # RStudio setting files |
---|
148 | %{__mkdir_p} ${RPM_BUILD_ROOT}%{_sysconfdir}/rstudio |
---|
149 | %{__cp} %{SOURCE1} %{SOURCE2} ${RPM_BUILD_ROOT}%{_sysconfdir}/rstudio/ |
---|
150 | |
---|
151 | # PAM setting |
---|
152 | %{__mkdir_p} ${RPM_BUILD_ROOT}%{_sysconfdir}/pam.d |
---|
153 | %{__cp} ${RPM_BUILD_ROOT}%{_libdir}/rstudio-server/extras/pam/rstudio \ |
---|
154 | ${RPM_BUILD_ROOT}%{_sysconfdir}/pam.d/ |
---|
155 | |
---|
156 | # init.d setting |
---|
157 | %{__mkdir_p} ${RPM_BUILD_ROOT}%{_sysconfdir}/init.d/ |
---|
158 | %{__cp} ${RPM_BUILD_ROOT}%{_libdir}/rstudio-server/extras/init.d/redhat/rstudio-server \ |
---|
159 | ${RPM_BUILD_ROOT}%{_sysconfdir}/init.d/ |
---|
160 | |
---|
161 | %clean |
---|
162 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
163 | |
---|
164 | %pre |
---|
165 | if [ "$1" -eq 1 ]; then |
---|
166 | /usr/sbin/useradd rstudio-server -M -s /sbin/nologin >/dev/null 2>&1 || :; |
---|
167 | fi; |
---|
168 | |
---|
169 | %post |
---|
170 | %{_syssbindir}/chkconfig --add rstudio-server |
---|
171 | %{__mkdir_p} %{_var}/{run,lock,log,lib}/rstudio-server |
---|
172 | %{__chmod} 600 %{_var}/{run,lock,log,lib}/rstudio-server |
---|
173 | %{__chown} rstudio-server:rstudio-server \ |
---|
174 | %{_var}/{run,lock,log,lib}/rstudio-server |
---|
175 | |
---|
176 | %preun |
---|
177 | if [ "$1" -eq 0 ]; then |
---|
178 | %{_syssbindir}/service rstudio-server stop >/dev/null 2>&1 || : |
---|
179 | %{_syssbindir}/chkconfig --del rstudio-server ||: |
---|
180 | fi |
---|
181 | |
---|
182 | %postun |
---|
183 | %{__rm} -rf /var/{run,lock,log,lib}/rstudio-server |
---|
184 | |
---|
185 | |
---|
186 | %files |
---|
187 | %defattr(-, root, root) |
---|
188 | %doc COPYING NOTICE |
---|
189 | %{_sysconfdir}/init.d/rstudio-server |
---|
190 | %{_sysconfdir}/pam.d/rstudio |
---|
191 | %{_sysconfdir}/rstudio/ |
---|
192 | %{_libdir}/rstudio-server |
---|
193 | %{_sbindir}/ |
---|
194 | |
---|
195 | |
---|
196 | %changelog |
---|
197 | * Fri Aug 05 2016 Toshiaki Ara <ara_t@384.jp> 0.99.1274-1 |
---|
198 | - new package |
---|
199 | |
---|