Commit 81f1c7fd authored by Gaël Berthaud-Müller's avatar Gaël Berthaud-Müller
Browse files

first commit

parents
/dist
/distsrc
Build
```sh
dnf install fedora-packager fedora-review
./build.sh perl-Net-Interface perl-Zonemaster-LDNS perl-Zonemaster-Engine zonemaster-cli
```
Publish to copr repos
```sh
dnf install copr-cli
copr-cli build <project> ./distsrc/<package>.src.rpm
```
Install
```sh
dnf install dnf-plugins-core
dnf copr enable <user>/<project>
```
See also: https://developer.fedoraproject.org/deployment/copr/copr-cli.html
#!/bin/bash
set -xe
BASE=$(dirname $(realpath $0))
DIST=${BASE}/dist
DISTSRC=${BASE}/distsrc
function build_package {
NAME=$1
cd ${BASE}/${NAME}
specfile=${NAME}.spec
# Download sources
spectool -g ${specfile}
# Install build dependencies
dnf builddep -y ${specfile}
# Build package
fedpkg --release f34 local
rpm_files=$(find -iname '*.rpm' ! -iname '*debug*' ! -iname '*src*')
srcrpm_files=$(find -iname '*.src.rpm')
dnf install -y ${rpm_files}
cp ${rpm_files} ${DIST}
cp ${srcrpm_files} ${DISTSRC}
}
if [ -z "$@" ]; then
PACKAGES=$(find $BASE -maxdepth 1 -mindepth 1 -not \( -path ${DIST} -prune \) -type d -exec basename {} \;)
else
PACKAGES=$@
fi
mkdir -p ${DIST} ${DISTSRC}
for pkg in $PACKAGES; do
build_package $pkg
done
Name: perl-Net-Interface
Version: 1.016
Release: 1%{?dist}
Summary: Perl extension to access network interfaces
License: Distributable, see Copying
Group: Development/Libraries
URL: http://search.cpan.org/dist/Net-Interface/
Source0: http://www.cpan.org/authors/id/M/MI/MIKER/Net-Interface-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Socket)
BuildRequires: perl(Test::More) >= 0.62
BuildRequires: perl(diagnostics)
BuildRequires: perl(ExtUtils::Typemap)
BuildRequires: perl-devel
BuildRequires: perl-interpreter
BuildRequires: perl-generators
BuildRequires: gcc
BuildRequires: which
Requires: perl(Socket)
Requires: perl(Test::More) >= 0.62
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description
Net::Interface is a module that allows access to the host network
interfaces in a manner similar to ifconfig(8). Version 1.00 is a complete
re-write and includes support for IPV6 as well as the traditional IPV4.
%prep
%setup -q -n Net-Interface-%{version}
%build
./configure
%{__perl} -I. Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
%{_fixperms} $RPM_BUILD_ROOT/*
%check
make test
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc Artistic Changes Copying README configure.ac file_definitions install-sh test.pl.developer
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/Net*
%{_mandir}/man3/*
%changelog
* Thu Sep 02 2021 Zonemaster Team <zonemaster-group@lists.iis.se> 1.016-1
- Specfile autogenerated by cpanspec 1.78.
Name: perl-Zonemaster-Engine
Version: 4.2.2
Release: 1%{?dist}
Summary: Zonemaster Engine - part of the Zonemaster project
License: BSD-2-clause
Source0: https://github.com/zonemaster/zonemaster-engine/archive/refs/tags/v%{version}.tar.gz
BuildArch: noarch
BuildRequires: gettext
BuildRequires: make
BuildRequires: perl-generators
BuildRequires: perl-interpreter
BuildRequires: perl(strict)
BuildRequires: perl(utf8)
BuildRequires: perl(warnings)
BuildRequires: perl(Test::Fatal)
BuildRequires: perl(Module::Install::XSUtil)
BuildRequires: perl(Module::Install)
BuildRequires: perl(Devel::CheckLib)
BuildRequires: perl(Pod::Coverage)
BuildRequires: perl(Test::Differences)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Exception)
BuildRequires: perl(Clone)
BuildRequires: perl(Email::Valid)
BuildRequires: perl(File::ShareDir)
BuildRequires: perl(File::Slurp)
BuildRequires: perl-libintl
BuildRequires: perl(IO::Socket::INET6)
BuildRequires: perl(JSON::PP)
BuildRequires: perl(List::MoreUtils)
BuildRequires: perl(Module::Find)
BuildRequires: perl(Locale::Msgfmt)
BuildRequires: perl(Moose)
BuildRequires: perl(MooseX::Singleton)
BuildRequires: perl(Net::IP)
BuildRequires: perl(Readonly::XS)
BuildRequires: perl(Text::CSV)
BuildRequires: perl(Zonemaster::LDNS)
Requires: perl(:MODULE_COMPAT_%(eval "`/usr/bin/perl -V:version`"; echo $version))
Requires: perl(Clone)
Requires: perl(Email::Valid)
Requires: perl(File::ShareDir)
Requires: perl(File::Slurp)
Requires: perl-libintl
Requires: perl(IO::Socket::INET6)
Requires: perl(JSON::PP)
Requires: perl(List::MoreUtils)
Requires: perl(Module::Find)
Requires: perl(Locale::Msgfmt)
Requires: perl(Moose)
Requires: perl(MooseX::Singleton)
Requires: perl(Net::IP)
Requires: perl(Readonly::XS)
Requires: perl(Text::CSV)
Requires: perl(Zonemaster::LDNS)
%prep
%setup -n zonemaster-engine-%{version}
%build
make -C share
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{make_build}
%install
%{make_build} install DESTDIR=%{buildroot}
rm -f %{buildroot}%{perl_archlib}/perllocal.pod
rm -f %{buildroot}%{perl_archlib}/vendor_perl/auto/Zonemaster/Engine/.packlist
%check
make test
%files
%{perl_vendorlib}/*
%{_mandir}/man3/*.3pm.gz
%doc
%description
The Zonemaster system is a quality control tool for DNS zones, produced in
cooperation between AFNIC and IIS (the top-level registries for respectively
France and Sweden). It is a successor both to AFNIC's tool Zonecheck and IIS's
tool DNSCheck, and is intended to be an improvement over both.
The system as a whole consists of the test engine and, as distributed by the
project, two different front ends. One is a command-line interface intended
for use by experienced technicians, and one is a web interface meant for use
by anyone.
%changelog
* Thu Sep 2 2021 Zonemaster Team <zonemaster-group@lists.iis.se> - 2.2.0-1
- Inital release
Name: perl-Zonemaster-LDNS
Version: 2.2.0
Release: 1%{?dist}
Summary: Perl interface module for Zonemaster to NLnet Labs' ldns library
License: BSD-2-clause
Source0: https://github.com/zonemaster/zonemaster-ldns/archive/refs/tags/v%{version}.tar.gz
BuildRequires: make
BuildRequires: ldns-devel >= 1.7.1
BuildRequires: openssl-devel >= 1.1.1
BuildRequires: libidn-devel
BuildRequires: perl-generators
BuildRequires: perl-interpreter
BuildRequires: perl-devel
BuildRequires: perl(strict)
BuildRequires: perl(utf8)
BuildRequires: perl(warnings)
BuildRequires: perl(Test::Fatal)
BuildRequires: perl(Module::Install::XSUtil)
BuildRequires: perl(Module::Install)
BuildRequires: perl(Devel::CheckLib)
Requires: perl(:MODULE_COMPAT_%(eval "`/usr/bin/perl -V:version`"; echo $version))
Requires: ldns >= 1.7.1
Requires: openssl >= 1.1.1
Requires: libidn
%prep
%setup -n zonemaster-ldns-%{version}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor --no-internal-ldns
%{make_build}
%install
%{make_build} install DESTDIR=%{buildroot}
rm -f %{buildroot}%{perl_archlib}/perllocal.pod
rm -f %{buildroot}%{perl_archlib}/vendor_perl/auto/Zonemaster/LDNS/.packlist
%check
%{make_build} test
%files
%{perl_vendorarch}/*
%{_mandir}/man3/*.3pm.gz
%doc
%description
This module provides a Perl interface to the ldns library from NLnet Labs.
This module is written as part of the Zonemaster project, and therefore
primarily exposes the functionality needed for that. Since Zonemaster is a
diagnostic tool, that means the functions most used are those for looking
things up and inspecting them.
If you want a module that specifically aims to be a complete and transparent
interface to ldns, DNS::LDNS is a better fit than this module.
%changelog
* Thu Sep 2 2021 Zonemaster Team <zonemaster-group@lists.iis.se> - 2.2.0-1
- Inital release
Name: zonemaster-cli
Version: 3.1.0
Release: 2%{?dist}
Summary: Zonemaster CLI - part of the Zonemaster project
License: BSD-2-clause
Source0: https://github.com/zonemaster/zonemaster-cli/archive/refs/tags/v%{version}.tar.gz
BuildArch: noarch
BuildRequires: gettext
BuildRequires: make
BuildRequires: perl-generators
BuildRequires: perl-interpreter
BuildRequires: perl(strict)
BuildRequires: perl(utf8)
BuildRequires: perl(warnings)
BuildRequires: perl(MooseX::Getopt)
BuildRequires: perl(Text::Reflow)
BuildRequires: perl(Net::Interface)
BuildRequires: perl(JSON::XS)
BuildRequires: perl(Zonemaster::Engine)
Requires: perl(:MODULE_COMPAT_%(eval "`/usr/bin/perl -V:version`"; echo $version))
Requires: perl(MooseX::Getopt)
Requires: perl(Text::Reflow)
Requires: perl(Net::Interface)
Requires: perl(JSON::XS)
Requires: perl(Zonemaster::Engine)
%prep
%setup -n zonemaster-cli-%{version}
%build
make -C share
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{make_build}
%install
%{make_build} install DESTDIR=%{buildroot}
rm -f %{buildroot}%{perl_archlib}/perllocal.pod
rm -f %{buildroot}%{perl_archlib}/vendor_perl/auto/Zonemaster/CLI/.packlist
%check
make test
%files
%{perl_vendorlib}/*
%{_mandir}/man3/*.3pm.gz
%{_mandir}/man1/
%{_bindir}/zonemaster-cli
%doc
%description
The Zonemaster system is a quality control tool for DNS zones, produced in
cooperation between AFNIC and IIS (the top-level registries for respectively
France and Sweden). It is a successor both to AFNIC's tool Zonecheck and IIS's
tool DNSCheck, and is intended to be an improvement over both.
The system as a whole consists of the test engine and, as distributed by the
project, two different front ends. One is a command-line interface intended
for use by experienced technicians, and one is a web interface meant for use
by anyone.
%changelog
* Thu Sep 2 2021 Zonemaster Team <zonemaster-group@lists.iis.se> - 2.2.0-1
- Inital release
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment