remove unneeded sources

This commit is contained in:
Remi Collet 2016-05-28 07:48:18 +02:00
parent 3f74c8be7c
commit d1e321f550
3 changed files with 5 additions and 53 deletions

16
gd.spec
View File

@ -5,7 +5,7 @@
Summary: A graphics library for quick creation of PNG or JPEG images
Name: gd
Version: 2.2.1
Release: 1%{?prever}%{?short}%{?dist}
Release: 2%{?prever}%{?short}%{?dist}
Group: System Environment/Libraries
License: MIT
URL: http://libgd.github.io/
@ -14,12 +14,8 @@ URL: http://libgd.github.io/
# git archive --format=tgz --output=libgd-%{version}-%{commit}.tgz --prefix=libgd-%{version}/ master
Source0: libgd-%{version}-%{commit}.tgz
%else
Source0: https://github.com/libgd/libgd/releases/download/gd-2.2.1/libgd-2.2.1.tar.xz
Source0: https://github.com/libgd/libgd/releases/download/gd-%{version}/libgd-%{version}.tar.xz
%endif
# Missing in official archive, need for autoreconf
Source2: getver.pl
# Test data for CVE-2016-3074 test
Source3: invalid_neg_size.gd2
Patch1: gd-2.1.0-multilib.patch
Patch2: gd-2.2.1-initialize-full_filename.patch
@ -84,9 +80,6 @@ files for gd, a graphics library for creating PNG and JPEG graphics.
%patch2 -p1 -b .full_filename
%patch3 -p1 -b .unused-variable
# Workaround for missing file
cp %{SOURCE2} config/getver.pl
: $(perl config/getver.pl)
: regenerate autotool stuff
@ -120,8 +113,6 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libgd.a
%check
cp %SOURCE3 tests/gd2/
: Upstream test suite
make check
@ -152,6 +143,9 @@ grep %{version} $RPM_BUILD_ROOT%{_libdir}/pkgconfig/gdlib.pc
%changelog
* Sat May 28 2016 Remi Collet <remi@fedoraproject.org> - 2.2.1-2
- remove unneeded sources
* Fri May 27 2016 Marek Skalicky <mskalick@redhat.com> - 2.2.1-1
- Upgrade to 2.2.1 release
- Upstream moved to github.com

View File

@ -1,42 +0,0 @@
#!/usr/bin/env perl
# Simple script to extract the version number parts from src/gd.h. If
# called with the middle word of the version macro, it prints the
# value of that macro. If called with no argument, it outputs a
# human-readable version string. This must be run in the project
# root. It is used by configure.ac and docs/naturaldocs/run_docs.sh.
use strict;
my $key = shift;
my @version_parts = ();
open FH, "<src/gd.h" # old-style filehandle for max. portability
or die "Unable to open 'version.h' for reading.\n";
while(<FH>) {
next unless m{version605b5d1778};
next unless /^#define\s+GD_([A-Z0-9]+)_VERSION+\s+(\S+)/;
my ($lk, $lv) = ($1, $2);
if ($lk eq $key) {
chomp $lv;
$lv =~ s/"//g;
print $lv; # no newline
exit(0); # success!
}
push @version_parts, $lv if (!$key);
}
close(FH);
if (scalar @version_parts == 4) {
my $result = join(".", @version_parts[0..2]);
$result .= $version_parts[3];
$result =~ s/"//g;
print $result;
exit(0);
}
exit(1); # failure

Binary file not shown.