-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7f7eb25
Showing
12 changed files
with
219 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/rpm | ||
/tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Changelog :) | ||
|
||
## Format | ||
|
||
Based on [Keep a Changelog]. | ||
|
||
## Versioning Policy | ||
|
||
[Semantic Versioning Caret] | ||
|
||
## Versions | ||
|
||
### 0.1.0 | ||
|
||
* First release! | ||
|
||
[Keep a Changelog]: http://keepachangelog.com/en/1.0.0/ | ||
[Semantic Versioning Caret]: https://github.com/myowncake/semver-caret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
FROM amazonlinux:2.0.20181114 | ||
|
||
ARG version | ||
ARG target_version | ||
ARG target_version_minor | ||
|
||
RUN yum -y update | ||
RUN yum -y install \ | ||
fuse-devel \ | ||
gmp-devel \ | ||
libcurl-devel \ | ||
m4 \ | ||
make \ | ||
ocaml \ | ||
ocaml-camlp4-devel \ | ||
ocamldoc \ | ||
openssl-devel \ | ||
rpm-build \ | ||
sqlite-devel \ | ||
which \ | ||
zlib-devel | ||
RUN curl -L https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh | sh | ||
|
||
# RUN yum -y install \ | ||
# gcc \ | ||
# gcc-c++ \ | ||
# m4 \ | ||
# make \ | ||
# ncurses-devel \ | ||
# ocaml \ | ||
# ocaml-camlp4-devel \ | ||
# ocamldoc \ | ||
# opam \ | ||
# rpm-build | ||
# RUN amazon-linux-extras install -y epel | ||
# RUN yum -y install \ | ||
# gettext-devel \ | ||
# gtk3-devel \ | ||
# meson \ | ||
# python3 \ | ||
# rpm-build \ | ||
# vala | ||
# RUN curl -O http://dl.fedoraproject.org/pub/fedora/linux/releases/29/Everything/x86_64/os/Packages/g/granite-5.1.0-1.fc29.x86_64.rpm | ||
# RUN yum -y install granite-5.1.0-1.fc29.x86_64.rpm | ||
# RUN curl -O http://dl.fedoraproject.org/pub/fedora/linux/releases/29/Everything/x86_64/os/Packages/g/granite-devel-5.1.0-1.fc29.x86_64.rpm | ||
# RUN yum -y install granite-devel-5.1.0-1.fc29.x86_64.rpm | ||
|
||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
RUN curl -LO https://github.com/astrada/google-drive-ocamlfuse/archive/v$target_version.tar.gz | ||
RUN tar xzf v$target_version.tar.gz | ||
|
||
WORKDIR /app/google-drive-ocamlfuse-$target_version | ||
RUN opam init --disable-sandboxing | ||
RUN opam update | ||
RUN opam config set-global os-distribution centos | ||
RUN opam install -y depext | ||
RUN opam depext -v -d google-drive-ocamlfuse | ||
RUN opam install -y google-drive-ocamlfuse --destdir /dest/usr | ||
|
||
# RUN mkdir -p /dest/opt/albuild-google-drive-ocamlfuse/$version | ||
# WORKDIR /dest/opt/albuild-google-drive-ocamlfuse/$version | ||
# RUN mkdir bin | ||
# RUN mkdir lib | ||
# RUN mv /dest/usr/bin/com.github.donadigo.google-drive-ocamlfuse bin | ||
# RUN cp /usr/lib64/libgranite.so.5 lib | ||
# RUN cp /usr/lib64/libgee-0.8.so.2 lib | ||
# ADD com.github.donadigo.google-drive-ocamlfuse /dest/usr/bin | ||
# RUN sed -i "s,{{VERSION}},$version," /dest/usr/bin/com.github.donadigo.google-drive-ocamlfuse >/dev/null | ||
# RUN sed -i "s,Exec=com\.github\.donadigo\.google-drive-ocamlfuse,Exec=env XDG_MENU_PREFIX=mate- com.github.donadigo.google-drive-ocamlfuse," /dest/usr/share/applications/com.github.donadigo.google-drive-ocamlfuse.desktop >/dev/null | ||
|
||
RUN mkdir -p /root/rpmbuild/{SOURCES,SPECS} | ||
WORKDIR /root/rpmbuild | ||
ADD rpm.spec SPECS | ||
RUN sed -i "s,{{VERSION}},$version," SPECS/rpm.spec >/dev/null | ||
RUN sed -i "s,{{SOURCE0}},https://github.com/astrada/google-drive-ocamlfuse/archive/v$target_version.tar.gz," SPECS/rpm.spec >/dev/null | ||
RUN find /dest -type f | sed 's,^/dest,,' >> SPECS/rpm.spec | ||
RUN find /dest -type l | sed 's,^/dest,,' >> SPECS/rpm.spec | ||
RUN rpmbuild -bb SPECS/rpm.spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2018 mosop | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# albuild-google-drive-ocamlfuse | ||
|
||
Yet another unofficial [google-drive-ocamlfuse] package for Amazon Linux 2. | ||
|
||
## Install (Amazon WorkSpaces) | ||
|
||
### System Requirements | ||
|
||
### Instructions | ||
|
||
1. Download the package from [the Release page](https://github.com/albuild/google-drive-ocamlfuse/releases/tag/v0.1.0). | ||
|
||
1. Install the package. | ||
|
||
``` | ||
sudo yum -y install albuild-google-drive-ocamlfuse-0.1.0-0.amzn2.x86_64.rpm | ||
``` | ||
## Build (Amazon WorkSpaces) | ||
### System Requirements | ||
* Docker | ||
### Instructions | ||
1. Clone this repository. | ||
``` | ||
git clone https://github.com/albuild/google-drive-ocamlfuse.git | ||
``` | ||
1. Go to the repository. | ||
``` | ||
cd google-drive-ocamlfuse | ||
``` | ||
1. Build a new image. | ||
``` | ||
bin/build | ||
``` | ||
1. Extract the built package from the image. The package will be copied to the ./rpm directory. | ||
``` | ||
bin/cp | ||
``` | ||
1. Delete the image. | ||
``` | ||
bin/rmi | ||
``` | ||
[google-drive-ocamlfuse]: https://github.com/astrada/google-drive-ocamlfuse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
eval `cat env` | ||
target_version_minor=`echo $target_version | sed 's/^\([0-9]\+\.[0-9]\+\).\+/\1/'` | ||
exec docker build . --force-rm --build-arg version=$version --build-arg target_version=$target_version --build-arg target_version_minor=$target_version_minor -t albuild-google-drive-ocamlfuse:$version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
eval `cat env` | ||
mkdir -p rpm | ||
exec docker run --rm -v `pwd`/rpm:/rpm albuild-google-drive-ocamlfuse:$version /bin/bash -l -c "cp /root/rpmbuild/RPMS/x86_64/albuild-google-drive-ocamlfuse-$version-1.amzn2.x86_64.rpm /rpm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
eval `cat env` | ||
bin/cp || exit 1 | ||
exec sudo yum install rpm/albuild-google-drive-ocamlfuse-$version-1.amzn2.x86_64.rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
eval `cat env` | ||
exec docker rmi albuild-google-drive-ocamlfuse:$version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
eval `cat env` | ||
exec docker run -it --rm albuild-google-drive-ocamlfuse:$version /bin/bash -l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
version=0.1.0 | ||
target_version=0.7.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Summary: Yet another unofficial google-drive-ocamlfuse package for Amazon Linux 2 | ||
Name: albuild-google-drive-ocamlfuse | ||
Version: {{VERSION}} | ||
Release: 1%{?dist} | ||
Group: Applications/File | ||
License: BSD-3-Clause | ||
Source0: {{SOURCE0}} | ||
URL: https://github.com/albuild/google-drive-ocamlfuse | ||
BuildArch: x86_64 | ||
AutoReqProv: no | ||
|
||
%description | ||
Yet another unofficial google-drive-ocamlfuse package for Amazon Linux 2. | ||
|
||
%install | ||
cp -r /dest/* %{buildroot}/ | ||
|
||
%clean | ||
rm -rf %{buildroot} | ||
|
||
%files |