Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:maxiotis:DistIndependent
talys-2.04-data
talys-2.04-data.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File talys-2.04-data.spec of Package talys-2.04-data
%define debug_package %{nil} %define mname talys %define prevVersion 2.0 Version: 1.0 Name: %{mname}-%{version}-data Release: 0 Summary: Structure files for TALYS License: MIT Group: Productivity/Scientific/Physics Url: https://nds.iaea.org/talys/ Source0: %{mname}-structure-%{version}.tar.gz BuildArch: noarch AutoReqProv: no Conflicts: %{name}-multi-version %description Structure files for nuclear reactions simulation program TALYS. %package multi-version Summary: Structure files for multi versions TALYS Group: Productivity/Scientific/Physics BuildArch: noarch AutoReqProv: no Conflicts: %{name} BuildRequires: %{mname}-%{prevVersion}-data BuildRequires: fdupes Requires: (%{mname}-%{prevVersion}-data or %{mname}-%{prevVersion}-data-multi-version) %description multi-version Structure files for nuclear reactions simulation program TALYS. Build in a way to save space if multiple versions of TALYS are needed. %prep %setup -q -n %{mname}-structure-%{version} %build %install install -d %{buildroot}%{_datadir}/%{mname}-%{version}/structure-multi cp -r `ls -d * | grep -v debian` %{buildroot}%{_datadir}/%{mname}-%{version}/structure-multi/ cp -r %{_datadir}/%{mname}-%{prevVersion} %{buildroot}%{_datadir} target="" declare -a sources fdupes -q -p -n -r %{buildroot}%{_datadir} | while read line ; do if [ "$line" == "" ] ; then if [ ! "$target" == "" ] || [ ! ${sources[0]} == "" ] ; then if [ "$target" == "" ] ; then target="${sources[0]}" ; unset sources[0] ; fi ; for sourc in ${sources[@]} ; do rm -rf $sourc ; ln -s -r $target $sourc ; done ; target="" ; unset sources ; fi ; else if echo "$line" | grep -v "%{mname}-%{version}.structure" ; then target="$line" ; else sources+=("$line") ; fi ; fi ; done rm -rf %{buildroot}%{_datadir}/%{mname}-%{prevVersion} install -d %{buildroot}%{_datadir}/%{mname}-%{version}/structure mv `ls -d * | grep -v debian` %{buildroot}%{_datadir}/%{mname}-%{version}/structure/ %post multi-version if [ ! -d %{_datadir}/%{mname}-%{version}/structure ] && [ -d %{_datadir}/%{mname}-%{version}/structure-multi ] ; then ln -s %{_datadir}/%{mname}-%{version}/structure-multi %{_datadir}/%{mname}-%{version}/structure ; fi %preun multi-version if [ "$1" = 0 ] ; then if [ -h %{_datadir}/%{mname}-%{version}/structure ] ; then rm -rf %{_datadir}/%{mname}-%{version}/structure ; fi ; fi %files %dir %{_datadir}/%{mname}-%{version} %dir %{_datadir}/%{mname}-%{version}/structure %{_datadir}/%{mname}-%{version}/structure/* %files multi-version %dir %{_datadir}/%{mname}-%{version} %dir %{_datadir}/%{mname}-%{version}/structure-multi %{_datadir}/%{mname}-%{version}/structure-multi/* %changelog * Mon Sep 21 2015 Axiotis Michail -
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