Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
isv:ownCloud:ocis
ocis
ocis.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ocis.spec of Package ocis
# # spec file for package name # # Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: ocis Version: 2.0.0rc.1 %define ocisreleaseversion 2.0.0 %define webreleaseversion 6.0.0 Release: 0 Summary: ownCloud Infinite Scale Stack License: Apache-2.0 Group: Productivity/Networking/Web/Utilities URL: https://github.com/owncloud/ocis Source0: https://github.com/owncloud/ocis/archive/refs/tags/v%{ocisreleaseversion}.tar.gz # download the release tarball -> untar it -> run go mod vendor -> tar cfvz vendor.tar.gz vendor/ # -> move the file here & commit Source1: vendor.tar.gz Source2: https://github.com/owncloud/web/releases/download/v%{webreleaseversion}/web.tar.gz Source3: ocis.service Source4: ocis.env # chdir ocis/services/idp -> run make generate -> chdir assets -> tar cfvz idp_assets.tar.gz . # -> move the file here & commit Source5: idp_assets.tar.gz # same as idp but for settings Source6: settings_assets.tar.gz %if 0%{?fedora} BuildRequires: golang %else BuildRequires: golang-packaging %endif BuildRequires: glibc-static %description ownCloud Infinite Scale Stack. %define USER ocis %define GROUP ocis %define USER_HOME /var/lib/ocis %define CONFIGPATH /etc/ocis %define OCISREPO github.com/owncloud/ocis/v2 %prep %pre /usr/sbin/groupadd -r %{GROUP} &>/dev/null ||: /usr/sbin/useradd -g %{GROUP} -s /bin/false -r -c "OCIS Server" -d %{USER_HOME} %{USER} &>/dev/null ||: %{service_add_pre %{name}.service} %post %{service_add_post %{name}.service} echo "+---------------------------+" echo "| OCIS has been installed |" echo "+---------------------------+" echo "| Initial credentials have |" echo "| been created in /etc/ocis |" echo "| make sure to change them |" echo "| through the webui!!! |" echo "+---------------------------+" echo "" echo "As a default, ocis will listen on https://localhost:9200." echo "You can change this in /etc/ocis/ocis.env" echo "" %preun %{service_del_preun %{name}.service} %postun %{service_del_postun %{name}.service} %define LDFLAGS -X "%{OCISREPO}/ocis-pkg/config/defaults.BaseDataPathType=path" -X "%{OCISREPO}/ocis-pkg/config/defaults.BaseDataPathValue=/var/lib/ocis" -X "%{OCISREPO}/ocis-pkg/config/defaults.BaseConfigPathType=path" -X "%{OCISREPO}/ocis-pkg/config/defaults.BaseConfigPathValue=/etc/ocis" %build tar xf %{SOURCE0} cd %{name}-%{ocisreleaseversion} tar xf %{SOURCE1} cd services/web/assets tar xf %{SOURCE2} cd ../../ cd idp/assets tar xf %{SOURCE5} cd ../../ cd settings/assets tar xf %{SOURCE6} cd ../../../ cd ocis/cmd/ocis go build \ -mod=vendor \ -buildmode=pie \ -ldflags '-s -w -extldflags "-static" %{LDFLAGS}' \ -trimpath %install %{__install} -d -m755 %{buildroot}%{_unitdir} %{__install} -d -m755 %{buildroot}%{USER_HOME} %{__install} -d -m755 %{buildroot}%{CONFIGPATH} %{__install} %{SOURCE3} %{buildroot}%{_unitdir}/ %{__install} %{SOURCE4} %{buildroot}/etc/ocis/ install -D -m0755 %{name}-%{ocisreleaseversion}/ocis/cmd/ocis/%{name} %{buildroot}%{_bindir}/%{name} %files %{_bindir}/%{name} %{_unitdir}/ocis.service %attr(0600,%{USER},%{GROUP}) /etc/ocis/ocis.env %dir %attr(0755,%{USER},%{GROUP}) %{CONFIGPATH} %dir %attr(0755,%{USER},%{GROUP}) %{USER_HOME} %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor