use install -D in three instances, drop it on one
OBS-URL: https://build.opensuse.org/package/show/science/jmol?expand=0&rev=8
This commit is contained in:
parent
9856e1cdf0
commit
0aa2d11e77
29
jmol.spec
29
jmol.spec
@ -28,20 +28,20 @@ Url: http://jmol.sf.net/
|
||||
Source: http://downloads.sf.net/jmol/Jmol-%{version}_%date-binary.zip
|
||||
Source2: Jmol_icon13.png
|
||||
#Source2-Orig: http://wiki.jmol.org/index.php/File:Jmol_icon13.png
|
||||
Source3: %{name}.man
|
||||
Source4: %{name}.desktop
|
||||
Source3: %name.man
|
||||
Source4: %name.desktop
|
||||
Patch1: datadir.diff
|
||||
Patch2: fsf-adress.patch
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: unzip
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: update-desktop-files
|
||||
Requires: java
|
||||
|
||||
%description
|
||||
Jmol is an open-source Java-based viewer for chemical structures in 3D with
|
||||
Jmol is a Java-based viewer for chemical structures in 3D with
|
||||
features for chemicals, crystals, materials and biomolecules.
|
||||
|
||||
%prep
|
||||
@ -55,27 +55,24 @@ dos2unix CHANGES.txt COPYRIGHT.txt LICENSE.txt README.txt
|
||||
perl -i -pe 's{\@pkgdatadir\@}{%_datadir/%name}gs' jmol.sh
|
||||
# man
|
||||
cp %{S:3} .
|
||||
sed -i 's/INST_VERSION/%{version}/' jmol.man
|
||||
sed -i 's/INST_SUMMARY/%{summary}/' jmol.man
|
||||
sed -i 's/INST_VERSION/%version/' jmol.man
|
||||
sed -i 's/INST_SUMMARY/%summary/' jmol.man
|
||||
gzip jmol.man
|
||||
|
||||
%install
|
||||
b="%buildroot"
|
||||
# jar
|
||||
mkdir -p "$b/%_datadir/%name"
|
||||
install -D -p -m 644 Jmol.jar "$b/%_datadir/%name/"
|
||||
install -p -m 644 Jmol.jar "$b/%_datadir/%name/"
|
||||
# script
|
||||
mkdir -p "$b/%_bindir"
|
||||
install -D -p -m 755 jmol.sh "$b/%_bindir/jmol"
|
||||
install -Dpm0755 jmol.sh "$b/%_bindir/jmol"
|
||||
# icon
|
||||
mkdir -p "$b/%_datadir/pixmaps"
|
||||
install -m 644 Jmol_icon13.png "$b/%_datadir/pixmaps/%name.png"
|
||||
install -Dpm0644 Jmol_icon13.png "$b/%_datadir/pixmaps/%name.png"
|
||||
# manual
|
||||
mkdir -p %{buildroot}%{_mandir}/man1
|
||||
install -m 644 jmol.man.gz "$b/%_mandir/man1/jmol.1.gz"
|
||||
install -Dpm0644 jmol.man.gz "$b/%_mandir/man1/jmol.1.gz"
|
||||
# .desktop
|
||||
desktop-file-install --dir %{buildroot}%{_datadir}/applications %{S:4}
|
||||
%suse_update_desktop_file %{name}
|
||||
desktop-file-install --dir %buildroot%_datadir/applications %{S:4}
|
||||
%suse_update_desktop_file %name
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
@ -84,6 +81,6 @@ desktop-file-install --dir %{buildroot}%{_datadir}/applications %{S:4}
|
||||
%_datadir/%name
|
||||
%_datadir/applications/%name.desktop
|
||||
%_datadir/pixmaps/%name.png
|
||||
%_mandir/man1/%{name}.1.gz
|
||||
%_mandir/man1/%name.1.gz
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user