File _service:download_src_package:Adun.spec of Package Adun-Snapshot
## RPM spec-file for Adun
## Builds valid RPMS for Suse 11.3+ and Fedora 13,14
%define gs_name Adun
%define gs_version 0.83
%define gs_install_domain SYSTEM
%define gs_prefix /usr
%define gs_makefiles %{gs_prefix}/share/GNUstep/Makefiles
%define gs_main_file_list ./obj/main-file-list
%define gs_devel_file_list ./obj/devel-file-list
%define gs_configure NO
%define release_prefix 12.1907
%define is_snapshot YES
%if %{defined is_snapshot}
Name: %{gs_name}-Snapshot
%else
Name: %{gs_name}
%endif
Version: %{gs_version}
BuildRoot: %{_tmppath}/%{gs_name}-buildroot
## Code from Adun.spec.in
Release: 12.1907
License: GPL
Source: %{gs_name}-%{gs_version}.tar.gz
Group: Productivity/Scientific/Physics
Summary: An Integrated Research Environment for Molecular Simulation - CVS Snapshot
Vendor: Computational Biophysics & Biochemistry Group UPF
URL: http://adun.imim.es
BuildRequires: gnustep-make gnustep-base gnustep-gui gsl gcc-objc
BuildRequires: gnustep-base-devel gnustep-gui-devel gsl-devel
%if %{defined suse_version}
BuildRequires: libobjc41 libreadline5 readline5-devel
%else
BuildRequires: libobjc readline readline-devel
%endif
%description
Adun is an advanced biomolecular simulation application. It provides a GUI, commmand-line molecular simulator and interactive shell
%package devel
Summary: Files necessary for developing core classes of the Adun IRE
Group: Development/Libraries/Other
%description devel
Package containing header files necessary to compile plugins or extende core frameworks
## Fixed rules from /usr/local/cluster/GNUstep/System/Library/Makefiles/spec-rules.template
#
# Setup sources
#
%prep
%setup -n %{gs_name}-%{gs_version}
#
# Build commands
#
%build
if [ -z "$GNUSTEP_MAKEFILES" ]; then
. %{gs_makefiles}/GNUstep.sh
fi
if [ "%{gs_configure}" = "YES" ]; then
CFLAGS="$RPM_OPT_FLAGS" ./configure
fi
make
#
# Install commands (generate file list too)
#
%install
if [ -z "$GNUSTEP_MAKEFILES" ]; then
. %{gs_makefiles}/GNUstep.sh
fi
make DESTDIR=$RPM_BUILD_ROOT \
GNUSTEP_INSTALLATION_DOMAIN=%{gs_install_domain} \
filelist=yes install
#As of gnustep-make 2.2 links to directories are omitted from the file list
#However these are necessary to get frameworks to work
#This line finds all the links to directores and appends them to the file-list
#the sed command strings the build root path from the find results
find $RPM_BUILD_ROOT -type l -xtype d | sed "s@^$RPM_BUILD_ROOT@@g" >> ./obj/file-list
#As of gs-make 2.4 all directories are omitted from the file list ....
#We have to add them with the %%dir directive - otherwise everything under them
#will be automatically included again
find $RPM_BUILD_ROOT -type d | sed "s@^$RPM_BUILD_ROOT@%dir @g" >> ./obj/file-list
#Now remove all header files from file-list to get a non-devel file list
grep -v '\.h' ./obj/file-list > ./obj/main-file-list
grep '\.h' ./obj/file-list > ./obj/devel-file-list
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%clean
rm -rf $RPM_BUILD_ROOT
# File list (generated by install)
#
%files -f %{gs_main_file_list}
%defattr(-,root,root)
%files devel -f %{gs_devel_file_list}
%defattr(-,root,root)
#If you make a new package log the changes here
#Note: suse change go in a separate file
%changelog