Net::libnetFAQ document replaced with a hyper link because of the Artistic license
This commit is contained in:
parent
00d1ca514c
commit
9d07b6a807
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,3 +3,5 @@
|
||||
/libnet-3.08.tar.gz
|
||||
/libnet-3.09.tar.gz
|
||||
/libnet-3.10.tar.gz
|
||||
/libnet-3.10_repackaged.tar.gz
|
||||
/libnetFAQ.pod
|
||||
|
@ -1,16 +1,27 @@
|
||||
Name: perl-libnet
|
||||
Version: 3.10
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Perl clients for various network protocols
|
||||
# other files: GPL+ or Artistic
|
||||
## Not in binary packages
|
||||
# repackage.sh: GPLv2+
|
||||
## Removed from upstream sources:
|
||||
# lib/Net/libnetFAQ.pod: Artistic (CPAN RT#117888)
|
||||
License: GPL+ or Artistic
|
||||
Group: Development/Libraries
|
||||
URL: http://search.cpan.org/dist/libnet/
|
||||
Source0: http://www.cpan.org/authors/id/S/SH/SHAY/libnet-%{version}.tar.gz
|
||||
# Origin source archive contains Artistic only files, CPAN RT#117888.
|
||||
# Local archive produced by "./repackage.sh %%{version}" command.
|
||||
# http://www.cpan.org/authors/id/S/SH/SHAY/libnet-%%{version}.tar.gz
|
||||
Source0: libnet-%{version}_repackaged.tar.gz
|
||||
# Replacement for the Artistic only file, CPAN RT#117888.
|
||||
Source1: libnetFAQ.pod
|
||||
# Convert Changes to UTF-8
|
||||
Patch0: libnet-3.09-Normalize-Changes-encoding.patch
|
||||
# Do not create Net/libnet.cfg, bug #1238689
|
||||
Patch1: libnet-3.08-Do-not-create-Net-libnet.cfg.patch
|
||||
BuildArch: noarch
|
||||
BuildRequires: coreutils
|
||||
BuildRequires: findutils
|
||||
BuildRequires: make
|
||||
BuildRequires: perl
|
||||
@ -91,6 +102,8 @@ protocols used in the internet community.
|
||||
|
||||
%prep
|
||||
%setup -q -n libnet-%{version}
|
||||
# Provide dummy Net::libnetFAQ document, CPAN RT#117888
|
||||
install -m 0644 %{SOURCE1} lib/Net
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
@ -113,6 +126,10 @@ make test
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%changelog
|
||||
* Fri Sep 16 2016 Petr Pisar <ppisar@redhat.com> - 3.10-2
|
||||
- Net::libnetFAQ document replaced with a hyper link because of the Artistic
|
||||
license (CPAN RT#117888)
|
||||
|
||||
* Mon Aug 01 2016 Jitka Plesnikova <jplesnik@redhat.com> - 3.10-1
|
||||
- 3.10 bump
|
||||
|
||||
|
59
repackage.sh
Executable file
59
repackage.sh
Executable file
@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2010 Red Hat, Inc.
|
||||
# Authors:
|
||||
# Thomas Woerner <twoerner@redhat.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
version=$1
|
||||
[ -z "$version" ] && { echo "Usage: $0 <version>"; exit 1; }
|
||||
|
||||
# files to be removed without the main libnet-<version>/ prefix
|
||||
declare -a REMOVE
|
||||
REMOVE[${#REMOVE[*]}]="lib/Net/libnetFAQ.pod"
|
||||
|
||||
# no changes below this line should be needed
|
||||
|
||||
orig="libnet-${version}"
|
||||
orig_tgz="${orig}.tar.gz"
|
||||
repackaged="${orig}_repackaged"
|
||||
repackaged_tar="${repackaged}.tar"
|
||||
repackaged_tgz="${repackaged_tar}.gz"
|
||||
|
||||
# pre checks
|
||||
[ ! -f "${orig_tgz}" ] && { echo "ERROR: ${orig_tgz} does not exist"; exit 1; }
|
||||
[ -f "${repackaged_tgz}" ] && { echo "ERROR: ${repackaged_tgz} already exist"; exit 1; }
|
||||
|
||||
# repackage
|
||||
failure=0
|
||||
gzip -dc "${orig_tgz}" > "${repackaged_tar}"
|
||||
for file in "${REMOVE[@]}"; do
|
||||
tar -f "${repackaged_tar}" --delete "${orig}/${file}" >> repackage.log
|
||||
[ $? != 0 ] && { echo "ERROR: Could not remove file ${orig}/${file} from archive."; failure=1; } || echo "Removed ${orig}/${file} from archive."
|
||||
done
|
||||
[ $failure != 0 ] && { echo "See repackage.log for details."; exit 1; }
|
||||
gzip -9 -n "${repackaged_tar}"
|
||||
|
||||
# post checks
|
||||
RET=0
|
||||
for file in "${REMOVE[@]}"; do
|
||||
found=$(tar -ztvf "${repackaged_tgz}" | grep "${file}")
|
||||
[ -n "$found" ] && { echo "ERROR: file ${file} is still in the repackaged archive."; RET=1; }
|
||||
done
|
||||
|
||||
[ $RET == 0 ] && echo "Sucessfully repackaged ${orig}: ${repackaged_tgz}"
|
||||
|
||||
exit $RET
|
Loading…
Reference in New Issue
Block a user