Accepting request 1140031 from Education
fix compilation with rpm-4.19 OBS-URL: https://build.opensuse.org/request/show/1140031 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/garlic?expand=0&rev=21
This commit is contained in:
commit
d6fe23825a
26
garlic-1.6-hardening.patch
Normal file
26
garlic-1.6-hardening.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
Description: Propagate hardening options
|
||||||
|
Author: Andreas Tille <tille@debian.org>
|
||||||
|
Last-Update: Fri, 01 Dec 2017 20:45:48 +0100
|
||||||
|
|
||||||
|
Index: garlic-1.6/Makefile
|
||||||
|
===================================================================
|
||||||
|
--- garlic-1.6.orig/Makefile
|
||||||
|
+++ garlic-1.6/Makefile
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
CC = gcc
|
||||||
|
|
||||||
|
#CCOPT = -O
|
||||||
|
-CCOPT = -O3
|
||||||
|
+CCOPT = -O3 $(CFLAGS)
|
||||||
|
#CCOPT = -O3 -g3
|
||||||
|
#CCOPT = -ansi -pedantic -g3
|
||||||
|
#CCOPT = -ansi -pedantic -O -Wall -Wstrict-prototypes -g3
|
||||||
|
@@ -10,7 +10,7 @@ HEADERS = defines.h typedefs.h
|
||||||
|
|
||||||
|
LIBPATH =
|
||||||
|
|
||||||
|
-LINKOPT = -lX11 -lm
|
||||||
|
+LINKOPT = -lX11 -lm $(LDFLAGS)
|
||||||
|
|
||||||
|
OBJECTS = garlic.o print_usage.o print_help.o print_version.o \
|
||||||
|
register.o alloc_gui.o alloc_config.o alloc_mol_complex.o \
|
@ -1,6 +1,8 @@
|
|||||||
--- Makefile
|
Index: garlic-1.6/Makefile
|
||||||
+++ Makefile
|
===================================================================
|
||||||
@@ -8,7 +8,7 @@
|
--- garlic-1.6.orig/Makefile
|
||||||
|
+++ garlic-1.6/Makefile
|
||||||
|
@@ -8,7 +8,7 @@ CCOPT = -O3
|
||||||
|
|
||||||
HEADERS = defines.h typedefs.h
|
HEADERS = defines.h typedefs.h
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
--- garlic-1.3/register.c
|
Index: garlic-1.6/register.c
|
||||||
+++ garlic-1.3/register.c
|
===================================================================
|
||||||
@@ -33,6 +33,8 @@
|
--- garlic-1.6.orig/register.c
|
||||||
|
+++ garlic-1.6/register.c
|
||||||
|
@@ -33,6 +33,8 @@ Notes:
|
||||||
|
|
||||||
int Register_ (void)
|
int Register_ (void)
|
||||||
{
|
{
|
||||||
@ -9,9 +11,11 @@
|
|||||||
char outfile_nameA[SHORTSTRINGSIZE];
|
char outfile_nameA[SHORTSTRINGSIZE];
|
||||||
char command_stringA[STRINGSIZE];
|
char command_stringA[STRINGSIZE];
|
||||||
FILE *outfileP;
|
FILE *outfileP;
|
||||||
--- garlic-1.3/typedefs.h
|
Index: garlic-1.6/typedefs.h
|
||||||
+++ garlic-1.3/typedefs.h
|
===================================================================
|
||||||
@@ -38,7 +38,7 @@
|
--- garlic-1.6.orig/typedefs.h
|
||||||
|
+++ garlic-1.6/typedefs.h
|
||||||
|
@@ -38,7 +38,7 @@ typedef struct /* VectorS */
|
||||||
|
|
||||||
|
|
||||||
/* Configuration data from $HOME/.garlicrc , or - if this file */
|
/* Configuration data from $HOME/.garlicrc , or - if this file */
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 18 12:21:26 UTC 2019 - lars@linux-schulserver.de - 1.6
|
||||||
|
|
||||||
|
- run spec cleaner
|
||||||
|
- use %%license macro on current distributions
|
||||||
|
- added garlic-1.6-hardening.patch
|
||||||
|
- rebased all other patches
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Feb 19 20:21:27 UTC 2018 - crrodriguez@opensuse.org
|
Mon Feb 19 20:21:27 UTC 2018 - crrodriguez@opensuse.org
|
||||||
|
|
||||||
|
95
garlic.spec
95
garlic.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package garlic
|
# spec file for package garlic
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -12,38 +12,40 @@
|
|||||||
# license that conforms to the Open Source Definition (Version 1.9)
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
# published by the Open Source Initiative.
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define _xorg7libs %{_lib}
|
||||||
|
%define _xorg7libs32 lib
|
||||||
|
%define _xorg7bin bin
|
||||||
|
%define _xorg7_mandir %{_mandir}
|
||||||
|
%define _xorg7pixmaps include
|
||||||
|
%define _xorg7libshare share
|
||||||
|
%define _xorg7_xkb %{_datadir}/X11/xkb
|
||||||
|
%define _xorg7_termcap %{_prefix}/lib/X11%{_sysconfdir}
|
||||||
|
%define _xorg7_serverincl %{_includedir}/xorg
|
||||||
|
%define _xorg7_fonts %{_datadir}/fonts
|
||||||
|
%define _xorg7_prefix %{_prefix}
|
||||||
Name: garlic
|
Name: garlic
|
||||||
Version: 1.6
|
Version: 1.6
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Molecular Graphics Visualization Tool
|
Summary: Molecular Graphics Visualization Tool
|
||||||
License: LGPL-2.1+
|
License: LGPL-2.1-or-later
|
||||||
Group: Productivity/Scientific/Chemistry
|
Group: Productivity/Scientific/Chemistry
|
||||||
Url: http://www.ccp14.ac.uk/ccp/web-mirrors/garlic/garlic/
|
Url: http://www.ccp14.ac.uk/ccp/web-mirrors/garlic/garlic/
|
||||||
Source0: %{name}-%{version}.tar.bz2
|
Source0: %{name}-%{version}.tar.bz2
|
||||||
Source1: %{name}-%{version}-doc.tar.bz2
|
Source1: %{name}-%{version}-doc.tar.bz2
|
||||||
Source2: %{name}.1.gz
|
Source2: %{name}.1.gz
|
||||||
Patch: %{name}-%{version}.patch
|
Patch0: %{name}-%{version}.patch
|
||||||
Patch1: garlic-%{version}-libpath.patch
|
Patch1: garlic-%{version}-libpath.patch
|
||||||
Patch2: garlic-1.6-undef.patch
|
Patch2: garlic-1.6-undef.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
Patch3: garlic-1.6-hardening.patch
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: update-desktop-files
|
BuildRequires: update-desktop-files
|
||||||
BuildRequires: pkgconfig(x11)
|
BuildRequires: pkgconfig(x11)
|
||||||
%define _xorg7libs %_lib
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%define _xorg7libs32 lib
|
|
||||||
%define _xorg7bin bin
|
|
||||||
%define _xorg7_mandir %_mandir
|
|
||||||
%define _xorg7pixmaps include
|
|
||||||
%define _xorg7libshare share
|
|
||||||
%define _xorg7_xkb /usr/share/X11/xkb
|
|
||||||
%define _xorg7_termcap /usr/lib/X11/etc
|
|
||||||
%define _xorg7_serverincl /usr/include/xorg
|
|
||||||
%define _xorg7_fonts /usr/share/fonts
|
|
||||||
%define _xorg7_prefix /usr
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Garlic is an X Window System tool intended for the molecular
|
Garlic is an X Window System tool intended for the molecular
|
||||||
@ -64,57 +66,62 @@ macromolecules.
|
|||||||
This subpackage contains the full documentation to Garlic.
|
This subpackage contains the full documentation to Garlic.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -b 0
|
%setup -q -b 0
|
||||||
%setup -T -D -a 1
|
%setup -q -T -D -a 1
|
||||||
%patch -p 1
|
%patch0 -p1
|
||||||
%patch1
|
%patch1 -p1
|
||||||
%patch2 -p 1
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
# fix executable permission on text files
|
# fix executable permission on text files
|
||||||
cd garlic-1.6
|
cd garlic-1.6
|
||||||
chmod -x README favicon.ico tolower.script garlic.gif cookbook/garlic.gif precompiled_packages/garlic.gif
|
chmod -x README favicon.ico tolower.script garlic.gif cookbook/garlic.gif precompiled_packages/garlic.gif
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make %{?_smp_mflags} CC="%__cc" CCOPT="$RPM_OPT_FLAGS" LIBPATH="-L/usr/%{_lib}"
|
make %{?_smp_mflags} CC="gcc" CCOPT="%{optflags}" LIBPATH="-L/usr/%{_lib}"
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p $RPM_BUILD_ROOT/{usr/%{_xorg7bin},etc,%{_xorg7_mandir}/man1/}
|
mkdir -p %{buildroot}/{usr/%{_xorg7bin},etc,%{_xorg7_mandir}/man1/}
|
||||||
cp -a garlic $RPM_BUILD_ROOT/usr/%{_xorg7bin}/
|
cp -a garlic %{buildroot}%{_prefix}/%{_xorg7bin}/
|
||||||
cp -a .garlicrc $RPM_BUILD_ROOT/etc/garlicrc
|
cp -a .garlicrc %{buildroot}%{_sysconfdir}/garlicrc
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/share/garlic
|
mkdir -p %{buildroot}%{_datadir}/garlic
|
||||||
cp -a residues.pdb $RPM_BUILD_ROOT/usr/share/garlic/residues.pdb
|
cp -a residues.pdb %{buildroot}%{_datadir}/garlic/residues.pdb
|
||||||
mv %{name}-%{version} html
|
mv %{name}-%{version} html
|
||||||
install -m 644 %{S:2} $RPM_BUILD_ROOT/%{_xorg7_mandir}/man1/
|
install -m 644 %{SOURCE2} %{buildroot}/%{_xorg7_mandir}/man1/
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
|
mkdir -p %{buildroot}%{_datadir}/pixmaps
|
||||||
cp -a garlic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/garlic.xpm
|
cp -a garlic.xpm %{buildroot}%{_datadir}/pixmaps/garlic.xpm
|
||||||
rm -rf html/source html/mouse/.xvpics
|
rm -rf html/source html/mouse/.xvpics
|
||||||
chmod 644 html/{README,bold_statement.html,docs.html,favicon.ico,garlic.gif,index.html,monster.gif,versions.html}
|
chmod 644 html/{README,bold_statement.html,docs.html,favicon.ico,garlic.gif,index.html,monster.gif,versions.html}
|
||||||
%suse_update_desktop_file -n -c %name "Garlic" Garlic garlic garlic Education Science Chemistry
|
%suse_update_desktop_file -n -c %{name} "Garlic" Garlic garlic garlic Education Science Chemistry
|
||||||
|
|
||||||
# Can't do this via %%doc in %%files, because that runs too late,
|
# Can't do this via %%doc in %%files, because that runs too late,
|
||||||
# after %%fdupes.
|
# after %%fdupes.
|
||||||
mkdir -p "%buildroot/%_defaultdocdir/%name"
|
mkdir -p "%{buildroot}/%{_defaultdocdir}/%{name}"
|
||||||
cp -a html 1mal.script 2fcp.script 2omf.script 2por.script \
|
cp -a html 1mal.script 2fcp.script 2omf.script 2por.script \
|
||||||
BUGS COPYING ENVIRONMENT HISTORY README TODO \
|
BUGS COPYING ENVIRONMENT HISTORY README TODO \
|
||||||
"%buildroot/%_defaultdocdir/%name"
|
"%{buildroot}/%{_defaultdocdir}/%{name}"
|
||||||
|
|
||||||
%fdupes %buildroot/%_prefix
|
%fdupes %{buildroot}/%{_prefix}
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%dir %_defaultdocdir/%name/
|
%dir %{_defaultdocdir}/%{name}/
|
||||||
%_defaultdocdir/%name/COPYING
|
%if 09%{?suse_version} >= 01500
|
||||||
|
%license %{_defaultdocdir}/%{name}/COPYING
|
||||||
|
%else
|
||||||
|
%doc %{_defaultdocdir}/%{name}/COPYING
|
||||||
|
%endif
|
||||||
%doc %{_xorg7_mandir}/man1/*
|
%doc %{_xorg7_mandir}/man1/*
|
||||||
%config /etc/garlicrc
|
%config(noreplace) %{_sysconfdir}/garlicrc
|
||||||
/usr/%{_xorg7bin}/%{name}
|
%{_prefix}/%{_xorg7bin}/%{name}
|
||||||
/usr/share/garlic
|
%{_datadir}/garlic
|
||||||
/usr/share/garlic/residues.pdb
|
%{_datadir}/garlic/residues.pdb
|
||||||
/usr/share/applications/%{name}.desktop
|
%{_datadir}/applications/%{name}.desktop
|
||||||
/usr/share/pixmaps/garlic.xpm
|
%{_datadir}/pixmaps/garlic.xpm
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%_defaultdocdir/%name/
|
%{_defaultdocdir}/%{name}/
|
||||||
%exclude %_defaultdocdir/%name/COPYING
|
%exclude %{_defaultdocdir}/%{name}/COPYING
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user