Blame iv.spec

84b0ac8
# Issues filed:
84b0ac8
# https://github.com/neuronsimulator/iv/issues/14: -Wstrict-aliasing
84b0ac8
# https://github.com/neuronsimulator/iv/issues/15: -Wchar-subscript
84b0ac8
84b0ac8
70b998a
%global commit 14890c412662cd7d0c4bce1d777473a904168647
84b0ac8
%global shortcommit %(c=%{commit}; echo ${c:0:7})
84b0ac8
70b998a
%global checkout_date 20200818
84b0ac8
84b0ac8
Name:           iv
70b998a
Version:        0.1
70b998a
Release:        0.1.%{checkout_date}git%{shortcommit}%{?dist}
84b0ac8
Summary:        InterViews graphical library
84b0ac8
84b0ac8
License:  MIT
84b0ac8
URl:      https://github.com/neuronsimulator/%{name}
84b0ac8
Source0:  https://github.com/neuronsimulator/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
84b0ac8
70b998a
# Mark libraries and let them be installed in the correct default folder
70b998a
# https://github.com/neuronsimulator/iv/pull/34
70b998a
Patch0:   0001-Set-soversion-for-shared-objects-on-Linux-builds.patch
70b998a
Patch1:   0002-Use-LIB_INSTALL_DIR-instead-of-hardcoding-lib.patch
70b998a
70b998a
BuildRequires:  cmake
84b0ac8
BuildRequires:  /usr/bin/libtoolize
84b0ac8
BuildRequires:  gcc-c++
70b998a
BuildRequires:  git-core
84b0ac8
BuildRequires:  xorg-x11-server-devel
84b0ac8
BuildRequires:  libXext-devel
70b998a
BuildRequires:  libXcomposite-devel
84b0ac8
# Is built against a bundled version, does not provide its libraries etc.
84b0ac8
# https://github.com/neuronsimulator/iv/issues/3
84b0ac8
Provides: bundled(libtiff) = 3.00
84b0ac8
84b0ac8
# for %%{_datadir}/X11/app-defaults
84b0ac8
Requires: libXt
84b0ac8
84b0ac8
%description
84b0ac8
The InterViews graphical library used by NEURON.
84b0ac8
84b0ac8
84b0ac8
%package        devel
84b0ac8
Summary:        Development files for %{name}
84b0ac8
Requires:       %{name}%{?_isa} = %{version}-%{release}
84b0ac8
84b0ac8
%description    devel
84b0ac8
The %{name}-devel package contains libraries and header files for
84b0ac8
developing applications that use %{name}.
84b0ac8
84b0ac8
84b0ac8
%prep
70b998a
%autosetup -n %{name}-%{commit} -S git
70b998a
70b998a
# Remove the rpath helper
70b998a
sed -i '/RpathHelper/ d' CMakeLists.txt
84b0ac8
84b0ac8
# Remove spurious executable permission
84b0ac8
chmod -x README Copyright
84b0ac8
70b998a
# remove scripts
70b998a
find . -name "_gendefs" -delete
70b998a
84b0ac8
84b0ac8
%build
70b998a
%cmake \
70b998a
-DIV_ENABLE_SHARED=ON
70b998a
70b998a
%cmake_build
84b0ac8
84b0ac8
84b0ac8
%install
70b998a
%cmake_install
84b0ac8
find $RPM_BUILD_ROOT -name '*.la' -delete
84b0ac8
84b0ac8
# Don't install these, we don't want anyone using them
84b0ac8
rm -vrf $RPM_BUILD_ROOT/%{_includedir}/TIFF
84b0ac8
84b0ac8
# Move file to right folder
84b0ac8
install -pm 0755 -d $RPM_BUILD_ROOT/%{_datadir}/X11/
84b0ac8
mv -v $RPM_BUILD_ROOT/%{_datadir}/app-defaults  $RPM_BUILD_ROOT/%{_datadir}/X11/
84b0ac8
70b998a
# remove stray makefile
70b998a
rm -f $RPM_BUILD_ROOT/%{_includedir}/Makefile.in
70b998a
rm -rf $RPM_BUILD_ROOT/%{_includedir}/IV-{Win,Mac}
70b998a
70b998a
# correctly set up shared dirs
70b998a
pushd $RPM_BUILD_ROOT/%{_libdir}/
70b998a
    ln -sv ./libinterviews.so.0.0.0 libinterviews.so.0
70b998a
    ln -sv ./libunidraw.so.0.0.0 libunidraw.so.0
70b998a
popd
70b998a
84b0ac8
%files
84b0ac8
%license Copyright
84b0ac8
%doc README
70b998a
%{_libdir}/libinterviews.so.0.0.0
70b998a
%{_libdir}/libinterviews.so.0
70b998a
%{_libdir}/libunidraw.so.0.0.0
70b998a
%{_libdir}/libunidraw.so.0
70b998a
%{_datadir}/X11/app-defaults/
84b0ac8
%{_bindir}/idemo
84b0ac8
%{_bindir}/iclass
84b0ac8
%{_bindir}/idraw
84b0ac8
84b0ac8
%files devel
84b0ac8
%{_includedir}/Dispatch/
84b0ac8
%{_includedir}/IV-2_6/
84b0ac8
%{_includedir}/IV-X11/
84b0ac8
%{_includedir}/IV-look/
84b0ac8
%{_includedir}/InterViews/
70b998a
%{_includedir}/OS/
70b998a
%{_includedir}/Unidraw/
70b998a
%{_includedir}/ivcarbon.h
70b998a
%{_includedir}/ivmcw.h
70b998a
%{_includedir}/ivstream.h
70b998a
%{_includedir}/ivversion.h
70b998a
%{_includedir}/macivdef.h
70b998a
%{_libdir}/libinterviews.so
70b998a
%{_libdir}/libunidraw.so
70b998a
%{_libdir}/cmake/iv/
84b0ac8
84b0ac8
%changelog
70b998a
* Tue Aug 18 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.1-0.1.20200818git14890c4
70b998a
- Update to latest upstream snapshot
70b998a
- move to cmake
70b998a
385c82a
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.3.20191117git08c48bb
385c82a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
385c82a
ef58016
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.2.20191117git08c48bb
ef58016
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
ef58016
84b0ac8
* Sun Nov 17 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0-0.1.20191117git08c48bb
84b0ac8
- Update as per review comments
84b0ac8
- Update to latest upstream commit: fixes -Wsequence-point
84b0ac8
- Update to latest upstream commit: fixes library dependencies
84b0ac8
- Correct location of app-info file and add Requires
84b0ac8
- Improve find command
84b0ac8
- Remove license from devel
84b0ac8
- File compilation warning issues and note them as comments
84b0ac8
84b0ac8
* Wed Nov 06 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0-0.0.20191106git74f1207
84b0ac8
- Initial rpm build