File:  [Local Repository] / imach / distributions / gnulinux / imach.spec.in
Revision 1.4: download - view: text, annotated - select for diffs
Thu Mar 17 08:36:58 2022 UTC (2 years, 7 months ago) by brouard
Branches: MAIN
CVS tags: HEAD
*** empty log message ***

#%global debug_package %{nil}
Summary: Interpolated Markov Chain
Name: imach
Version:  ${IMACH_VERSION_MAJOR}.${IMACH_VERSION_MINOR}
Release: 1
License: GPLv2+ with exceptions
Group: Applications/Sciences
URL: http://euroreves.ined.fr/imach
Source0: %{name}-%{version}.tar.xz
Source12:        imach.png
Source13:        imach-mime.xml
Source14:        imach.1
#BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

%description

%prep
%setup -q -n %{srcdirname}

%build
cd ..
#rm -rf build_tree
mkdir build_tree
cd build_tree
cmake -DCMAKE_INSTALL_PREFIX=%{rpmprefix} ../%{srcdirname}
make

# Create desktop file
cat > %{name}.desktop <<EOF
[Desktop Entry]
Name=IMaCh
Comment=Interpolated Markov Chain Programm
Exec=/usr/bin/imach %f
Terminal=true
Type=Application
MimeType=application/x-imach;text/txt;
Icon=imach.png
Categories=Science;Math;NumericalAnalysis
EOF

%install
cd ../build_tree
make install

#rm -rf $RPM_BUILD_ROOT
##mkdir -p %{buildroot}%{_bindir}/
#%makeinstall ROOT="$RPM_BUILD_ROOT"
#make  ROOT="$RPM_BUILD_ROOT" install
#install -D -m 755 src/imach      %{buildroot}%{_bindir}/imach
install -d %{buildroot}/%{_mandir}/man{1,5}
install -D -m 644 %SOURCE14  %{buildroot}%{_datadir}/man1/
#install -p -m 644 man/*.1 %{buildroot}%{_mandir}/man1/
install -D -m 644 %SOURCE12  %{buildroot}%{_datadir}/icons/imach.png
install -D -m 644 %SOURCE13  %{buildroot}%{_datadir}/mime/packages/imach.xml
install -D -m 644 imach.desktop  %{buildroot}%{_datadir}/applications/imach.desktop
#install -d -p -m 755 %{_builddir}%{name}-%{version}/bin/*  %{buildroot}%{_bindir}/


%clean
# rm -rf %{srcdirname}
# rm -rf build_tree
# #rm -rf $RPM_BUILD_ROOT


%files
#%defattr(-,root,root,-)
%defattr(-,root,root,-)
%{_datadir}/applications/%{name}.desktop
%dir %{prefix}
%{prefix}/*
%doc
%{_bindir}/%{name}*
%{_mandir}/man1/*
%{_datadir}/applications/*%{name}*.desktop
%{_datadir}/mime/packages/%{name}.xml
#%{_datadir}/pixmaps/%{name}.png
#%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
#%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/icons/%{name}.png

#macro %{__ln_s}
#%{__ln_s} -f %{_bindir}/%{name} %{_bindir}/imach
%post
ln -s -f %{_bindir}/%{name} %{_bindir}/imach

%changelog
* Thu Aug 28 2014 Brouard Nicolas <brouard@ined.fr> - 
- Initial build.


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>