Compare commits

..

No commits in common. "master" and "v1.16.6.90" have entirely different histories.

45 changed files with 720 additions and 1104 deletions

View File

@ -1,34 +1,3 @@
Changes in version 1.16.8
--- --- -- 2020 Silvan Calarco <silvan.calarco(a)mambasoft.it>
+ improvement
* dnf install support in default configuration
-------------------------------------------------------------------------------
Changes in version 1.16.7
--- --- -- 2016 Madrisan <davide.madrisan(a)gmail.com>
+ improvement
* templates/kde5 - Silvan Calarco
(Not very recent) updates to template.
* conf/04-rpmbuild-format-unpackaged-filelist.conf - Silvan Calarco
moving KDE4 icons to /usr/share/icons to share them with KF5.
* conf/03-apse.conf - Silvan Calarco
use a mirror for distrowatch or they will ban your IP.
* templates/python - Davide Madrisan
Add the rpm macros required for building both Python2 and Python3 packages
with a single specfile.
+ bugfix
* lib/libnetwork.lib - Silvan Calarco
Support for git repositories which don't have '.git' in their url.
-------------------------------------------------------------------------------
Changes in version 1.16.6 Changes in version 1.16.6
Thu May 07 2015 Madrisan <davide.madrisan(a)gmail.com> Thu May 07 2015 Madrisan <davide.madrisan(a)gmail.com>

View File

@ -150,6 +150,14 @@ uninstall:
done done
dist: clean dist: clean
@for f in ChangeLog NEWS; do\
case `sed 15q $$f` in \
*"$(VERSION)"*) : ;; \
*) \
echo "$$f not updated; not releasing" 1>&2;\
exit 1;; \
esac; \
done
@rm -f history/$(dist_archive) @rm -f history/$(dist_archive)
@$(INSTALL_DIR) history @$(INSTALL_DIR) history
@echo "Creating a temporary copy of the entire repository..." @echo "Creating a temporary copy of the entire repository..."
@ -170,10 +178,27 @@ dist: clean
popd >/dev/null;\ popd >/dev/null;\
rm -fr $$tmpdir rm -fr $$tmpdir
dist-rpm: dist dist-rpm: dist $(PACKAGE).spec
@rpm_sourcedir=`rpm --eval=%{_sourcedir}`;\ @rpm_name=$(PACKAGE)-$(VERSION)-$(RELEASE);\
mv -f history/$(dist_archive) $$rpm_sourcedir;\ rpm_sourcedir=`rpm --eval=%{_sourcedir} 2>/dev/null`;\
echo "and saved as \`$$rpm_sourcedir/$(dist_archive)'" rpm_specdir=`rpm --eval=%{_specdir} 2>/dev/null`;\
for d in $$rpm_sourcedir $$rpm_specdir; do\
[ -d "$$d" ] || \
{ echo "not found: $$d" 1>&2; exit 1; };\
done;\
echo "Copying $(dist_archive) to $$rpm_sourcedir...";\
(cp -p history/$(dist_archive) $$rpm_sourcedir &&\
mv -f $(PACKAGE).spec $$rpm_specdir &&\
echo "Creating rpm and srpm packages..." &&\
rpmbuild --clean -ba $$rpm_specdir/$(PACKAGE).spec) || exit 1
@echo "All done. Enjoy using $(PACKAGE)..."
dist-rpm-install: dist-rpm
@echo "Installing rpm packages..."
@rpm_pckdir=`rpm --eval=%{_rpmdir} 2>/dev/null`;\
sudo rpm -hUv --force\
$$rpm_pckdir/noarch/$(PACKAGE)-*${VERSION}-${RELEASE}.noarch.rpm\
|| exit 1
clean: mostlyclean clean: mostlyclean
rm -f history/$(dist_archive) rm -f history/$(dist_archive)
@ -192,3 +217,4 @@ mostlyclean:
$(MAKE) clean -C po/$$loc || exit 1;\ $(MAKE) clean -C po/$$loc || exit 1;\
done done
@rm -f po/*.pot @rm -f po/*.pot

26
NEWS
View File

@ -1,29 +1,3 @@
List of user visible changes in the release 1.16.8
-- Improvement
* dnf support - Silvan Calarco
-------------------------------------------------------------------------------
List of user visible changes in the release 1.16.7
-- Improvement
* templates/kde5 - Silvan Calarco
templates/python - Davide Madrisan
Update to templates.
* conf files - Silvan Calarco
Minor improvements.
-- Bugfix
* lib/libnetwork.lib - Silvan Calarco
Support for git repositories which don't have '.git' in their url.
-------------------------------------------------------------------------------
List of user visible changes in the release 1.16.6 - "Tuscany" release List of user visible changes in the release 1.16.6 - "Tuscany" release
-- Improvement -- Improvement

View File

@ -1,77 +0,0 @@
autospec suite for *openmamba GNU/Linux*
========================================
## Overview
`Autospec` is a fully configurable suite of shell scripts for automatically generating specfiles from source tarballs and
downloading, upgrading, compiling, testing, and uploading the `rpm` (*RedHat Package Manager*) packages provided by an
rpm-based Linux distribution.
Autospec was created for the `QiLinux` distribution and is now used by the [openmamba](http://www.openmamba.org) developers.
## Architecture
#### Frontend
* /usr/bin/autospec
#### Plugins (/usr/bin)
* pck-extract - Extract a given file or list of files from a srpm archive
* pck-update - Update a rpm package to a specified version and release
* spec-create - Create a specfile for the specified source tarball
* config-getvar - Print the value of a given configuration variable
#### Libraries (/usr/share/autospec/lib)
* libapse.lib - Autospec Package Search Engine library
* libcfg.lib - Load the configuration files
* libmsgmng.lib - Manage debug/warning/error messages
* libnetwork.lib - Get informations from internet repositories
* libspec.lib - Specfiles parser
* libtest.lib - Autospec library used by the test framework
* libtranslate.lib - Autospec library used to setup translations
* librepository.lib - Interact with the distribution repositories
#### Tests (/usr/share/autospec/tests)
* test00_specsyntax - Syntax checks of a specfile
* test01_pkgquality - RPM quality checks
* test02_pkgsecurity - RPM security checks
#### Templates (/usr/share/autospec/templates)
* ghc
* gnome
* kde5
* library
* ocaml-libs
* perl
* python
* standard
* standard-daemon
* web
#### Configuration files
* /etc/autospec.conf
* /etc/autospec.d/*.conf
* $HOME/.autospec
* $HOME/.autospec.d/*.conf
#### Color Scheme files
* /etc/autospec.d/color-theme.*
#### Translation files (/usr/share/locale/it/LC_MESSAGES/)
* po files
## Get it, Try it, Love it...
Install autospec in openmamba by entering the following command in the terminal prompt:
smart install autospec
or
yum install --nogpgcheck autospec
if you already switched to yum.
## Bugs
If you find a bug please create an issue in the project bug tracker at
[openmamba GitLab](https://gitlab.mambasoft.it/openmamba/autospec/issues).

View File

@ -1,2 +1,2 @@
VERSION=1.35 VERSION=1.16.6
RELEASE=1mamba RELEASE=1mamba

View File

@ -36,8 +36,7 @@ let "print_version = 0"
function autospec.version() { function autospec.version() {
echo "\ echo "\
${me[0]} ${me[1]} ${me[0]} ${me[1]}
Copyright (C) 2004-2013 Davide Madrisan <davide.madrisan@gmail.com> Copyright (C) 2004-2013 Davide Madrisan <davide.madrisan@gmail.com>"
Copyright (C) 2013-2022 Silvan Calarco <silvan.calarco@mambasoft.it>"
} }
function autospec.copying() { function autospec.copying() {

View File

@ -20,6 +20,10 @@ Requires(pre): rpm
Requires: cpio, coreutils, curl, findutils, grep, sed Requires: cpio, coreutils, curl, findutils, grep, sed
Requires: /bin/mktemp Requires: /bin/mktemp
Requires: /usr/bin/getopt Requires: /usr/bin/getopt
%if "%{stage1}" != "1"
# host (and 'bind-utils') is not available in early stage platform development
Requires: /usr/bin/host
%endif
Requires: bzip2 Requires: bzip2
Requires: gzip Requires: gzip
Requires: unzip Requires: unzip

View File

@ -11,19 +11,19 @@ ftp_alias[1]="contrib"
ftp_enable[0]=1 ftp_enable[0]=1
ftp_enable[1]=1 ftp_enable[1]=1
# FTP path of RPMS packages (i.e. "ftp://ftp.openmamba.org/pub/openmamba/devel/RPMS") # FTP path of RPMS packages (i.e. "ftp://ftp.qilinux.it/pub/QiLinux/devel/RPMS")
# note: you can specify multiple choices: ftpurl_ro_rpms[0] .. ftpurl_ro_rpms[n] # note: you can specify multiple choices: ftpurl_ro_rpms[0] .. ftpurl_ro_rpms[n]
ftpurl_ro_rpms[0]="http://www.openmamba.org/pub/openmamba/devel/RPMS.@arch@" ftpurl_ro_rpms[0]="http://www.openmamba.org/pub/openmamba/devel/RPMS.@arch@"
ftpurl_ro_rpms[1]="http://www.openmamba.org/pub/openmamba/devel-contrib/RPMS.@arch@" ftpurl_ro_rpms[1]="http://www.openmamba.org/pub/openmamba/devel-contrib/RPMS.@arch@"
# FTP path of SRPMS packages (i.e. "ftp://ftp.openmamba.org/pub/openmamba/devel/SRPMS") # FTP path of SRPMS packages (i.e. "ftp://ftp.qilinux.it/pub/QiLinux/devel/SRPMS")
# note: you can specify multiple choices: ftpurl_ro_srpms[0] .. ftpurl_ro_srpms[n] # note: you can specify multiple choices: ftpurl_ro_srpms[0] .. ftpurl_ro_srpms[n]
ftpurl_ro_srpms[0]="http://www.openmamba.org/pub/openmamba/devel/SRPMS.base" ftpurl_ro_srpms[0]="http://www.openmamba.org/pub/openmamba/devel/SRPMS.base"
ftpurl_ro_srpms[1]="http://www.openmamba.org/pub/openmamba/devel-contrib/SRPMS.base" ftpurl_ro_srpms[1]="http://www.openmamba.org/pub/openmamba/devel-contrib/SRPMS.base"
# FTP setup data needed when uploading RPMS and SRPMS packages # FTP setup data needed when uploading RPMS and SRPMS packages
# - ftp_rw_server : name of the ftp server where package will be uploaded # - ftp_rw_server : name of the ftp server where package will be uploaded
# (i.e. "ftpcontrib.openmamba.org" or "ftp.openmamba.org") # (i.e. "ftpcontrib.qilinux.it" or "ftp.qilinux.it")
# - ftp_rw_user : username to gain write access to ftp server, if any # - ftp_rw_user : username to gain write access to ftp server, if any
# - ftp_rw_passwd : password to gain write access to ftp server, if any # - ftp_rw_passwd : password to gain write access to ftp server, if any
# - ftp_rw_port : ftp port (set if a non standard ftp port is used) # - ftp_rw_port : ftp port (set if a non standard ftp port is used)
@ -62,7 +62,7 @@ ftpdir_rw_old[0]=""
ftpdir_rw_old[1]="" ftpdir_rw_old[1]=""
# list of all supported architectures (note: 'noarch' is *not* a valid arch) # list of all supported architectures (note: 'noarch' is *not* a valid arch)
arch_list[0]="i586 arm x86_64 aarch64" arch_list[0]="i586 ppc arm x86_64"
arch_list[1]="i586" arch_list[1]="i586"
# where to upload noarch packages # where to upload noarch packages

View File

@ -49,7 +49,7 @@ Open\ Font\ License\ 1.1
Open\ Group\ Test\ Suite\ License Open\ Group\ Test\ Suite\ License
Open\ Software\ License\ 3.0 Open\ Software\ License\ 3.0
PHP\ License PHP\ License
Python Python
Python\ Software\ Foundation\ License Python\ Software\ Foundation\ License
QPL QPL
RealNetworks\ Public\ Source\ License\ 1.0 RealNetworks\ Public\ Source\ License\ 1.0
@ -68,112 +68,4 @@ zlib/libpng
Zope\ Public\ License Zope\ Public\ License
OSI\ Approved OSI\ Approved
no\ OSI\ Approved no\ OSI\ Approved
AFL-3.0
APL-1.0
Apache-2.0
Apache-1.1
APSL-2.0
Artistic-1.0-Perl
Artistic-1.0
Artistic-2.0
AAL
BSL-1.0
BSD-2-Clause-Patent
CECILL-2.1
CERN-OHL-P-2.0
CERN-OHL-S-2.0
CERN-OHL-W-2.0
CDDL-1.0
CPAL-1.0
CPL-1.0
CATOSL-1.1
CAL-1.0
CUA-OPL-1.0
EPL-1.0
EPL-2.0
eCos-2.0
ECL-1.0
ECL-2.0
EFL-1.0
EFL-2.0
Entessa
EUDatagrid
EUPL-1.2
Fair
Frameworx-1.0
AGPL-3.0-only
GPL-2.0
GPL-3.0-only
LGPL-2.1
LGPL-3.0-only
LGPL-2.0-only
HPND
IPL-1.0
Intel
IPA
ISC
Jam
LPPL-1.3c
BSD-3-Clause-LBNL
LiLiQ-P-1.1
LiLiQ-Rplus-1.1
LiLiQ-R-1.1
LPL-1.02
LPL-1.0
MS-PL
MS-RL
MirOS
MIT-0
Motosoto
MPL-1.1
MPL-2.0
MPL-1.0
MulanPSL-2.0
Multics
NASA-1.3
Naumen
NOKIA
NPOSL-3.0
NTP
OGTSL
OLFL-1.3
OSL-2.1
OSL-1.0
OLDAP-2.8
OSET-PL-2.1
PHP-3.0
PHP-3.01
PSF-2.0
RPSL-1.0
RPL-1.5
RPL-1.1
OFL-1.1
SimPL-2.0
SISSL
SPL-1.0
BSD-2-Clause
BSD-3-Clause
CNRI-Python
EUPL-1.1
MIT
NGPL
OSL-3.0
PostgreSQL
QPL-1.0
RSCPL
Sleepycat
Watcom-1.0
UPL-1.0
NCSA
Unlicense
VSL-0.1
W3C-20150513
wxWindows
Xnet
Zlib
Unicode-DFS-2015
UCL-1.0
0BSD
ZPL-2.0
ZPL-2.1
) )

View File

@ -12,8 +12,8 @@ library_name_structure=""
patch_name_structure="^%\{name\}-[0-9][\.0-9a-z]*-[a-zA-Z0-9_-]+*.patch[\.gzb2]*" patch_name_structure="^%\{name\}-[0-9][\.0-9a-z]*-[a-zA-Z0-9_-]+*.patch[\.gzb2]*"
# Structure for the 'Source'/'Source0' id # Structure for the 'Source'/'Source0' id
# Default value: "\(https\|http\|ftp\):\/\/.*\.\(tar\.gz\|tgz\|tar\.bz2\|tar\.Z\|shar\.gz\|zip\)" # Default value: "\(http\|ftp\):\/\/.*\.\(tar\.gz\|tgz\|tar\.bz2\|tar\.Z\|shar\.gz\|zip\)"
# that is a full internet address of a tarball package compressed with # that is a full internet address of a tarball package compressed with
# either gzip or bzip2 # either gzip or bzip2
# If you don't want to fix a structure use "" # If you don't want to fix a structure use ""
source0_name_structure="\(https\|http\|ftp\|git\):\/\/.*\.\(tar\.gz\|tgz\|tar\.bz2\|tar\.Z\|tar\.xz\|shar\.gz\|zip\)" source0_name_structure="\(http\|ftp\|git\):\/\/.*\.\(tar\.gz\|tgz\|tar\.bz2\|tar\.Z\|tar\.xz\|shar\.gz\|zip\)"

View File

@ -90,7 +90,6 @@ System/Libraries/OCaml
System/Libraries/Perl System/Libraries/Perl
System/Libraries/PHP System/Libraries/PHP
System/Libraries/Python System/Libraries/Python
System/Libraries/Ruby
System/Management System/Management
System/Multimedia System/Multimedia
System/Servers System/Servers

View File

@ -1,2 +1,3 @@
## macros used to automatically build debug packages -------------------------- ## macros used to automatically build debug packages --------------------------
rpm_macro_debug_package="%debug_package"
rpm_macro_debug_package_suffix="debug" rpm_macro_debug_package_suffix="debug"

View File

@ -3,75 +3,69 @@
apse_enabled[0]=1 apse_enabled[0]=1
apse_site_name[0]="source0" apse_site_name[0]="source0"
apse_enabled[1]=0 apse_enabled[1]=1
apse_site_name[1]="https://sourceforge.net" apse_site_name[1]="http://sourceforge.net"
apse_enabled[2]=1 apse_enabled[2]=1
apse_site_name[2]="https://repology.org" apse_site_name[2]="http://fileforum.betanews.com"
apse_uri[2]="https://repology.org/api/v1/projects/\${search_name}/" apse_uri[2]="http://fileforum.betanews.com/search?search_advanced=Search+Fileforum&os%5B%5D=12&alphabeta=R&title="
apse_error_msg[2]="Not found" apse_put_fields[2]=""
apse_jq[2]="try [.\"\${search_name}\"[] | select(.status | contains(\"newest\"))][0] |.version" apse_error_msg[2]="No releases "
apse_grep[2]=""
apse_sed[2]="s,.*<p><a href=\"http://fileforum.betanews.com/detail/[^ ]*>\${search_name}[^<]*[ ]\([^ <]*\)</a></p>.*,\1,pi"
#apse_enabled[2]=0 apse_enabled[3]=1
#apse_site_name[2]="http://fileforum.betanews.com" apse_site_name[3]="http://linux.softpedia.com"
#apse_uri[2]="http://fileforum.betanews.com/search?search_advanced=Search+Fileforum&os%5B%5D=12&alphabeta=R&title=" apse_uri[3]="http://linux.softpedia.com/progFinder"
#apse_put_fields[2]="" apse_put_fields[3]="search_term="
#apse_error_msg[2]="No releases " apse_error_msg[3]="No results "
#apse_grep[2]="" apse_grep[3]="<h2><a[^<]*\${search_name}[^a-zA-Z]"
#apse_sed[2]="s,.*<p><a href=\"http://fileforum.betanews.com/detail/[^ ]*>\${search_name}[^<]*[ ]\([^ <]*\)</a></p>.*,\1,pi" apse_sed[3]="s,.*<h2><a[^<]*\${search_name}[^<]*[ ]\([^ <]*\)</a>.*,\1,pi"
#apse_enabled[3]=0 apse_enabled[4]=1
#apse_site_name[3]="http://linux.softpedia.com" apse_site_name[4]="http://gnomefiles.org"
#apse_uri[3]="http://linux.softpedia.com/progFinder" apse_uri[4]="http://gnomefiles.org/content/search.php"
#apse_put_fields[3]="search_term=" apse_put_fields[4]="search=Search&text="
#apse_error_msg[3]="No results " apse_error_msg[4]="No entries\. "
#apse_grep[3]="<h2><a[^<]*\${search_name}[^a-zA-Z]" apse_grep[4]=""
#apse_sed[3]="s,.*<h2><a[^<]*\${search_name}[^<]*[ ]\([^ <]*\)</a>.*,\1,pi" apse_sed[4]="s,.*\${search_name}</span></a></h1>&nbsp;\([^&]*\)&nbsp;<.*,\1,pi"
#apse_enabled[4]=0 apse_enabled[5]=1
#apse_site_name[4]="http://gnomefiles.org" apse_site_name[5]="http://freecode.com"
#apse_uri[4]="http://gnomefiles.org/content/search.php" apse_uri[5]="http://freecode.com/projects/"
#apse_put_fields[4]="search=Search&text=" apse_put_fields[5]=""
#apse_error_msg[4]="No entries\. " apse_error_msg[5]="404 Not Found"
#apse_grep[4]="" apse_grep[5]="/releases/"
#apse_sed[4]="s,.*\${search_name}</span></a></h1>&nbsp;\([^&]*\)&nbsp;<.*,\1,pi" apse_sed[5]="s,.*<a href=\"/projects/\${search_name}/releases/[0-9]*\">\([^ <]*\)</a>.*,\1,pi"
#apse_enabled[5]=0 apse_enabled[6]=1
#apse_site_name[5]="http://freecode.com" apse_site_name[6]="http://sourcewell.berlios.de"
#apse_uri[5]="http://freecode.com/projects/" apse_uri[6]="http://sourcewell.berlios.de/appsearch.php?by=Importance&search="
#apse_put_fields[5]="" apse_put_fields[6]=""
#apse_error_msg[5]="404 Not Found" apse_error_msg[6]="No Application found"
#apse_grep[5]="/releases/" apse_grep[6]="appbyid.*\${search_name}[^a-zA-Z].*Stable"
#apse_sed[5]="s,.*<a href=\"/projects/\${search_name}/releases/[0-9]*\">\([^ <]*\)</a>.*,\1,pi" apse_sed[6]="s,.*<a href=\"appbyid.*\">\${search_name} \([^ <]*\)</a>.*,\1,pi"
#apse_enabled[6]=0 apse_enabled[7]=1
#apse_site_name[6]="http://sourcewell.berlios.de" apse_site_name[7]="http://distrowatch.gds.tuwien.ac.at"
#apse_uri[6]="http://sourcewell.berlios.de/appsearch.php?by=Importance&search=" apse_uri[7]="http://distrowatch.gds.tuwien.ac.at/packages.php?"
#apse_put_fields[6]="" apse_put_fields[7]=""
#apse_error_msg[6]="No Application found" apse_error_msg[7]="is currently being redesigned"
#apse_grep[6]="appbyid.*\${search_name}[^a-zA-Z].*Stable" apse_grep[7]="td.*/\${search_name}[-_][0-9]"
#apse_sed[6]="s,.*<a href=\"appbyid.*\">\${search_name} \([^ <]*\)</a>.*,\1,pi" apse_sed[7]="s,.*td><[^>]*>\([^ <]*\)<.*,\1,pi"
#apse_enabled[7]=0 apse_enabled[8]=1
#apse_site_name[7]="http://distrowatch.gds.tuwien.ac.at" apse_site_name[8]="http://directory.fsf.org"
#apse_uri[7]="http://distrowatch.gds.tuwien.ac.at/packages.php?" apse_uri[8]="http://directory.fsf.org/wiki/"
#apse_put_fields[7]="" apse_put_fields[8]=""
#apse_error_msg[7]="is currently being redesigned" apse_error_msg[8]="is currently no text"
#apse_grep[7]="td.*/\${search_name}[-_][0-9]" apse_grep[8]=""
#apse_sed[7]="s,.*td><[^>]*>\([^ <]*\)<.*,\1,pi" apse_sed[8]="s,^version \([^ ]*\).*,\1,pi"
#apse_enabled[8]=0 apse_enabled[9]=1
#apse_site_name[8]="http://directory.fsf.org" apse_site_name[9]="http://launchpad.net"
#apse_uri[8]="http://directory.fsf.org/wiki/" apse_uri[9]="http://launchpad.net/"
#apse_put_fields[8]="" apse_put_fields[9]=""
#apse_error_msg[8]="is currently no text" apse_error_msg[9]="page does not exist"
#apse_grep[8]="" apse_grep[9]=""
#apse_sed[8]="s,^version \([^ ]*\).*,\1,pi" apse_sed[9]="s,.*Latest version is \([^ ]*\).*,\1,pi"
#apse_enabled[9]=0
#apse_site_name[9]="http://launchpad.net"
#apse_uri[9]="http://launchpad.net/"
#apse_put_fields[9]=""
#apse_error_msg[9]="page does not exist"
#apse_grep[9]=""
#apse_sed[9]="s,.*Latest version is \([^ ]*\).*,\1,pi"

View File

@ -1,91 +1,64 @@
## conversion rules for unpackaged files ## conversion rules for unpackaged files
format_unpackaged_file_list_common="\ format_unpackaged_file_list_common="\
# java # python
s,^/usr/share/java,%{_javadir}, s,^/usr/include/python3.3m,%{python3_inc},
# xdg
s,^/usr/share/metainfo,%{_metainfodir},
# qt5
s,^/usr/include/qt5,%{_qt5_headerdir},
s,^/usr/share/doc/qt5,%{_qt5_docdir},
# qt6
s,^/usr/include/qt6,%{_qt6_headerdir},
s,^/usr/share/doc/qt6,%{_qt6_docdir},
# kde5 # kde5
s,^/usr/include/KF5,%{_kde5_includedir}, s,^/usr/include/KF5,%{_kde5_includedir},
s,^/usr/share/kf5,%{_kde5_datadir}/kf5, s,^/usr/share/kf5,%{_kde5_datadir}/kf5,
s,^/usr/share/kservicetypes5,%{_kde5_servicetypesdir}, s,^/usr/share/kservicetypes5,%{_kde5_servicetypesdir},
# kf6
s,^/usr/include/KF6,%{_kf6_includedir},
s,^/usr/share/kf6,%{_kf6_datadir}/kf6,
# systemd
s,^/usr/lib/systemd/system,%{_unitdir},
s,^/usr/lib/systemd/user,%{_userunitdir},
s,^/usr/lib/systemd/system-preset,%{_presetdir},
s,^/usr/lib/systemd/user-preset,%{_userpresetdir},
s,^/usr/lib/systemd,%{_systemd_util_dir},
s,^/usr/lib/udev/hwdb.d,%{_udevhwdbdir},
s,^/usr/lib/udev/rules.d,%{_udevrulesdir},
s,^/usr/lib/systemd/catalog,%{_journalcatalogdir},
s,^/usr/lib/binfmt.d,%{_binfmtdir},
s,^/usr/lib/sysctl.d,%{_sysctldir},
s,^/usr/lib/sysusers.d,%{_sysusersdir},
s,^/usr/lib/tmpfiles.d,%{_tmpfilesdir},
s,^/usr/share/user-tmpfiles.d,%{_user_tmpfilesdir},
s,^/usr/lib/environment.d,%{_environmentdir},
s,^/usr/lib/modules-load.d,%{_modulesloaddir},
s,^/usr/lib/modprobe.d,%{_modprobedir},
s,^/usr/lib/systemd/system-generators,%{_systemdgeneratordir},
s,^/usr/lib/systemd/user-generators,%{_systemdusergeneratordir},
s,^/usr/lib/systemd/system-environment-generators,%{_systemd_system_env_generator_dir},
s,^/usr/lib/systemd/user-environment-generators,%{_systemd_user_env_generator_dir},
# perl
s,^/usr/lib/perl[5-9]/site_perl/[0-9.]*/.*-linux-thread-multi,%{perl_sitearch},
s,^/usr/lib/perl[5-9]/site_perl/[0-9.]*,%{perl_sitelib},
s,^/usr/lib/perl[5-9]/vendor_perl/[0-9.]*/.*-linux-thread-multi,%{perl_vendorarch},
s,^/usr/lib/perl[5-9]/vendor_perl/[0-9.]*,%{perl_vendorlib},
# pam
s,^/etc/security,%{_pam_secconfdir},
s,^/etc/pam.d,%{_pam_confdir},
s,^/usr/share/pam.d,%{_pam_vendordir},
# generic translations # generic translations
s,^/usr/bin,%{_bindir}, s,^/usr/bin,%{_bindir},
s,^/usr/sbin,%{_sbindir}, s,^/usr/sbin,%{_sbindir},
s,^/usr/share/doc/,%{_docdir}/,
s,^/usr/share/info,%{_infodir}, s,^/usr/share/info,%{_infodir},
s,^/usr/share/man,%{_mandir}, s,^/usr/share/man,%{_mandir},
s,^/usr/share,%{_datadir}, s,^/usr/share,%{_datadir},
s,^/usr/include,%{_includedir}, s,^/usr/include,%{_includedir},
s,^/etc,%{_sysconfdir}, s,^/etc,%{_sysconfdir},
s,^/var,%{_localstatedir}, s,^/var,%{_localstatedir},
# kde4
s,^/etc/opt/kde,%{_kde4_sysconfdir},
s,^/opt/kde/bin,%{_kde4_bindir},
s,^/opt/kde/sbin,%{_kde4_sbindir},
s,^/opt/kde/include,%{_kde4_includedir},
s,^/opt/kde/share/applications,%{_kde4_xdgappsdir},
s,^/opt/kde/share/apps/kconf_update,%{_kde4_kconfupdatedir},
s,^/opt/kde/share/apps,%{_kde4_datadir},
s,^/opt/kde/share/autostart,%{_kde4_autostartdir},
s,^/opt/kde/share/config.kcfg,%{_kde4_kcfgdir},
s,^/opt/kde/share/config,%config %{_kde4_configdir},
s,^/opt/kde/share/dbus-1/interfaces,%{_kde4_dbusinterfacesdir},
s,^/opt/kde/share/dbus-1/services,%{_kde4_dbusservicesdir},
s,^/opt/kde/share/desktop-directories,%{_kde4_xdgdirectorydir},
s,^/opt/kde/share/doc/HTML/en,%doc %lang(en) %{_kde4_htmldir}/en,
s,^/opt/kde/share/doc/HTML,%{_kde4_htmldir},
s,^/usr/share/icons,%{_kde4_icondir},
s,^/opt/kde/share/kde4/services,%{_kde4_servicesdir},
s,^/opt/kde/share/kde4/servicetypes,%{_kde4_servicetypesdir},
s,^/opt/kde/share/locale,%{_kde4_localedir},
s,^/opt/kde/share/mime/packages,%{_kde4_xdgmimedir},
s,^/opt/kde/share/mimelnk,%{_kde4_mimedir},
s,^/opt/kde/share/sounds,%{_kde4_soundsdir},
s,^/opt/kde/share/templates,%{_kde4_templatesdir},
s,^/opt/kde/share/wallpapers,%{_kde4_wallpaperdir},
s,^/opt/kde/share,%{_kde4_sharedir},
" "
## conversion rules which are (target) architecture specific ## conversion rules which are (target) architecture specific
### i586 ### i586
format_unpackaged_file_list_i586="\ format_unpackaged_file_list_i586="\
# kde4
s,^/opt/kde/lib/kde4/libexec,%{_kde4_libexecdir},
s,^/opt/kde/lib/kde4/plugins,%{_kde4_pluginsdir},
s,^/opt/kde/lib,%{_kde4_libdir},
# kde5 # kde5
s,^/usr/lib/cmake/KF5,%{_kde5_libdir}/cmake/KF5, s,^/usr/lib/cmake/KF5,%{_kde5_libdir}/cmake/KF5,
s,^/usr/lib/libKF5,%{_kde5_libdir}/libKF5, s,^/usr/lib/libKF5,%{_kde5_libdir}/libKF5,
s,^/usr/lib/qt5/mkspecs/modules/qt_K,%{_kde5_mkspecsdir}/qt_K, s,^/usr/lib/qt5/mkspecs/modules/qt_K,%{_kde5_mkspecsdir}/qt_K,
# kde6
s,^/usr/lib/qt6/plugins/kf6,%{_kf6_plugindir},
# qt5
s,^/usr/lib/qt5/plugins,%{_qt5_plugindir},
s,^/usr/lib/qt5,%{_qt5_prefix},
# qt6
s,^/usr/lib/qt6/plugins,%{_qt6_plugindir},
s,^/usr/lib/qt6/qml,%{_qt6_qmldir},
s,^/usr/lib/qt6,%{_qt6_archdatadir},
# python # python
s,^/usr/lib/python2.7/site-packages,%{python27_sitearch}, s,^/usr/lib/python2.7/site-packages,%{python27_sitearch},
s,^/usr/lib/python3.11/site-packages,%{python3_sitearch}, s,^/usr/lib/python3.3/site-packages,%{python3_sitearch},
s,^/usr/lib/python3.7/site-packages,%{python37_sitearch},
s,^/usr/lib/python3.9/site-packages,%{python39_sitearch},
s,^/usr/lib/python3.10/site-packages,%{python310_sitearch},
s,^/usr/lib/python3.12/site-packages,%{python312_sitearch},
# pam
s,^/usr/lib/security,%{_pam_moduledir},
# libraries # libraries
s,^/usr/libexec,%{_libexecdir}, s,^/usr/libexec,%{_libexecdir},
s,^/usr/lib,%{_libdir}, s,^/usr/lib,%{_libdir},
@ -96,40 +69,22 @@ format_unpackaged_file_list_arm="$format_unpackaged_file_list_i586"
### x86_64 ### x86_64
format_unpackaged_file_list_x86_64="\ format_unpackaged_file_list_x86_64="\
# kde4
s,^/opt/kde/lib64/kde4/libexec,%{_kde4_libexecdir},
s,^/opt/kde/lib64/kde4/plugins,%{_kde4_pluginsdir},
s,^/opt/kde/lib64,%{_kde4_libdir},
# kde5 # kde5
s,^/usr/lib64/cmake/KF5,%{_kde5_libdir}/cmake/KF5, s,^/usr/lib64/cmake/KF5,%{_kde5_libdir}/cmake/KF5,
s,^/usr/lib64/libKF5,%{_kde5_libdir}/libKF5, s,^/usr/lib64/libKF5,%{_kde5_libdir}/libKF5,
s,^/usr/lib64/qt5/mkspecs/modules/qt_K,%{_kde5_mkspecsdir}/qt_K, s,^/usr/lib64/qt5/mkspecs/modules/qt_K,%{_kde5_mkspecsdir}/qt_K,
# kde6
s,^/usr/lib64/qt6/plugins/kf6,%{_kf6_plugindir},
# qt5
s,^/usr/lib64/qt5/plugins,%{_qt5_plugindir},
s,^/usr/lib64/qt5,%{_qt5_prefix},
# qt6
s,^/usr/lib64/qt6/plugins,%{_qt6_plugindir},
s,^/usr/lib64/qt6/qml,%{_qt6_qmldir},
s,^/usr/lib64/qt6,%{_qt6_archdatadir},
# python # python
s,^/usr/lib64/python2.7/site-packages,%{python27_sitearch}, s,^/usr/lib64/python2.7/site-packages,%{python27_sitearch},
s,^/usr/lib/python2.7/site-packages,%{python27_sitelib}, s,^/usr/lib/python2.7/site-packages,%{python27_sitelib},
s,^/usr/lib64/python3.11/site-packages,%{python3_sitearch}, s,^/usr/lib64/python3.3/site-packages,%{python3_sitearch},
s,^/usr/lib/python3.11/site-packages,%{python3_sitelib}, s,^/usr/lib/python3.3/site-packages,%{python3_sitelib},
s,^/usr/lib64/python3.7/site-packages,%{python37_sitearch},
s,^/usr/lib/python3.7/site-packages,%{python37_sitelib},
s,^/usr/lib64/python3.9/site-packages,%{python39_sitearch},
s,^/usr/lib/python3.9/site-packages,%{python39_sitelib},
s,^/usr/lib64/python3.10/site-packages,%{python310_sitearch},
s,^/usr/lib/python3.10/site-packages,%{python310_sitelib},
s,^/usr/lib64/python3.12/site-packages,%{python312_sitearch},
s,^/usr/lib/python3.12/site-packages,%{python312_sitelib},
# pam
s,^/usr/lib64/security,%{_pam_moduledir},
# libraries # libraries
s,^/usr/libexec64,%{_libexecdir}, s,^/usr/libexec64,%{_libexecdir},
s,^/usr/libexec,%{_prefix}/libexec, s,^/usr/libexec,%{_prefix}/libexec,
s,^/usr/lib64,%{_libdir}, s,^/usr/lib64,%{_libdir},
s,^/usr/lib,%{_prefix}/lib, s,^/usr/lib,%{_prefix}/lib,
s,^/lib64,/%{_lib}," s,^/lib64,/%{_lib},"
### aarch64
format_unpackaged_file_list_aarch64="$format_unpackaged_file_list_x86_64"

View File

@ -7,12 +7,10 @@
curl_opts_netlink="--connect-timeout 15 --retry 3" curl_opts_netlink="--connect-timeout 15 --retry 3"
# (default: "-L --remote-name --fail --progress-bar $curl_opts_netlink") # (default: "-L --remote-name --fail --progress-bar $curl_opts_netlink")
curl_options="-R -L --remote-name --fail --progress-bar $curl_opts_netlink" curl_options="-R -L --remote-name --fail --progress-bar $curl_opts_netlink"
# Syntax for 'proxy': "proxyhost:port" # Sintax for 'proxy': "proxyhost:port"
proxy="" proxy=""
# Sintax for 'proxy_user': "user:password" # Sintax for 'proxy_user': "user:password"
proxy_user="" proxy_user=""
# curl user agent
curl_user_agent="autospec/@version@ (Linux; openmamba; reports@openmamba.org)"
# Commands to run when a rpm package must be automatically installed # Commands to run when a rpm package must be automatically installed
# (NOTE: it could be necessary to manually configure sudo # (NOTE: it could be necessary to manually configure sudo
@ -23,22 +21,20 @@ curl_user_agent="autospec/@version@ (Linux; openmamba; reports@openmamba.org)"
# Examples: # Examples:
# apt : rpm_download_and_install="sudo apt-get --quiet --yes install" # apt : rpm_download_and_install="sudo apt-get --quiet --yes install"
# smart: rpm_download_and_install="sudo smart install --yes" # smart: rpm_download_and_install="sudo smart install --yes"
# yum : rpm_download_and_install="sudo yum install -y --nogpgcheck" rpm_download_and_install="sudo smart install --yes"
# dnf : rpm_download_and_install="sudo dnf install -y"
rpm_download_and_install="sudo dnf install --skip-broken -y"
rpm_install="sudo rpm -hUv" rpm_install="sudo rpm -hUv"
rpm_install_force="sudo rpm -hUv --force --nodeps" rpm_install_force="sudo rpm -hUv --force --nodeps"
# Never install packages matching this regular expression # Never install packages matching this regular expression
# - default value='-apidocs-' # - default value='' (can be for instance '-apidocs-')
rpm_install_noinstall_mask='-apidocs-|-debug-' rpm_install_noinstall_mask=''
# Mask that identify packages providing localization... # Mask that identify packages providing localization...
# - default value='-i18n-|-help-' # - default value='-i18n-|-help-'
rpm_install_l10n_pck_mask='-i18n-|-help-|-langpack-|langpacks-' rpm_install_l10n_pck_mask='-i18n-|-help-'
# ...and only install localization packages matching this regular expression # ...and only install localization packages matching this regular expression
# - default value='en' (can be for instance 'it|pl') # - default value='.*' (can be for instance 'it|pl')
rpm_install_l10n_pck_allow_lang_mask='en' rpm_install_l10n_pck_allow_lang_mask='.*'
# Options passed to rpm when installing a source rpm (srpm) # Options passed to rpm when installing a source rpm (srpm)
# - default value='--nodeps' # - default value='--nodeps'

View File

@ -1,4 +1,4 @@
## Allowed paths for system libraries ----------------------------------------- ## Allowed paths for system libraries -----------------------------------------
allowed_libdirs="\ allowed_libdirs="\
/lib:/usr/lib:/lib64:/usr/lib64" /lib:/usr/lib:/usr/lib/qt3/lib:/usr/lib/qt4/lib:/opt/kde3/lib:/opt/kde/lib"

View File

@ -23,9 +23,6 @@
packager_fullname= packager_fullname=
packager_email= packager_email=
## Detect rpm version
rpm_version="`rpm --version | sed 's|.* .* ||'`"
## Mode to be used when creating and updating the specfiles ------------------- ## Mode to be used when creating and updating the specfiles -------------------
rpm_specfile_mode="644" rpm_specfile_mode="644"

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# libapse.lib -- Autospec Package Search Engine library # libapse.lib -- Autospec Package Search Engine library
# Copyright (C) 2007,2012 Stefano Cotta Ramusino <stefano.cotta@openmamba.org> # Copyright (C) 2007,2012 Stefano Cotta Ramusino <stefano.cotta@openmamba.org>
# Copyright (C) 2008-2024 Silvan Calarco <silvan.calarco@mambasoft.it> # Copyright (C) 2008-2011 Silvan Calarco <silvan.calarco@mambasoft.it>
[ "$libapse_is_loaded" = 1 ] || { [ "$libapse_is_loaded" = 1 ] || {
libapse_is_loaded=1 libapse_is_loaded=1
@ -307,7 +307,7 @@ proxy:,proxy-user:,autoupdate-off: \
# FIXME : should `specname' be an optional argument? # FIXME : should `specname' be an optional argument?
[ "$specname" ] || { usage; ${EXIT_FUNC:-"exit"} 1; } [ "$specname" ] || { usage; ${EXIT_FUNC:-"exit"} 1; }
local fcurlout=$(mktemp -q -p /var/tmp -t fcurlout.XXXXXXXX) || local fcurlout=$(mktemp -q -t fcurlout.XXXXXXXX) ||
notify.error $"can't create temporary files" notify.error $"can't create temporary files"
# SPEC_SOURCE0_PCKNAME --> src0pckname # SPEC_SOURCE0_PCKNAME --> src0pckname
@ -321,8 +321,6 @@ proxy:,proxy-user:,autoupdate-off: \
local curr_curl_url pck_file new_version last_version local curr_curl_url pck_file new_version last_version
local curr_curl_proxy_opts="\ local curr_curl_proxy_opts="\
${proxy:+ --proxy $proxy}${proxy_user:+ --proxy-user $proxy_user}" ${proxy:+ --proxy $proxy}${proxy_user:+ --proxy-user $proxy_user}"
local curr_curl_user_agent_opts="\
${curl_user_agent:+ --user-agent \"$curl_user_agent\"}"
for i in `seq 1 ${#autoupdate_off[*]}`; do for i in `seq 1 ${#autoupdate_off[*]}`; do
apse_enabled[${autoupdate_off[$i-1]}]="0" apse_enabled[${autoupdate_off[$i-1]}]="0"
@ -345,9 +343,9 @@ ${curl_user_agent:+ --user-agent \"$curl_user_agent\"}"
<${NOTE}$curr_curl_url${NORM}> (\`${NOTE}source0${NORM}')..." <${NOTE}$curr_curl_url${NORM}> (\`${NOTE}source0${NORM}')..."
notify.debug "\ notify.debug "\
running: curl $curr_curl_proxy_opts $curr_curl_user_agent_opts -s -L \"$curr_curl_url\"" running: curl \$curr_curl_proxy_opts -s -L \"$curr_curl_url\""
curl $curl_opts_netlink \ curl $curl_opts_netlink \
$curr_curl_proxy_opts $curr_curl_user_agent_opts -s -L "$curr_curl_url" \ $curr_curl_proxy_opts -s -L "$curr_curl_url" \
> $fcurlout > $fcurlout
let "retval = $?" let "retval = $?"
@ -448,8 +446,8 @@ sort -t. -n -r -k1 -k2 -k3 -k4 -k5 -k6 -k7 -k8 -k9 -k10 ))
curr_curl_url="http://sourceforge.net/projects/$src_name/files/latest/download" curr_curl_url="http://sourceforge.net/projects/$src_name/files/latest/download"
notify.debug \ notify.debug \
"running: curl $curr_curl_proxy_opts $curr_curl_user_agent_opts -s -L \"$curr_curl_url\"" "running: curl \$curr_curl_proxy_opts -s -L \"$curr_curl_url\""
curl $curr_curl_proxy_opts $curr_curl_user_agent_opts -I -A Linux -s -L "$curr_curl_url" \ curl $curr_curl_proxy_opts -I -A Linux -s -L "$curr_curl_url" \
> $fcurlout > $fcurlout
let "retval = $?" let "retval = $?"
@ -499,21 +497,21 @@ sed -n "s,Location: \(.*\)?.*,\1,pi"`
$"looking at"" ${NOTE}(#$i)${NORM} <${NOTE}${apse_site_name[$i]}${NORM}>..." $"looking at"" ${NOTE}(#$i)${NORM} <${NOTE}${apse_site_name[$i]}${NORM}>..."
for search_name in $src_name $specname; do for search_name in $src_name $specname; do
[ "${apse_put_fields[$i]}" ] && curr_curl_url="${apse_uri[$i]}" || { [ "${apse_put_fields[$i]}" ] &&
curr_curl_url="$(echo "${apse_uri[$i]}" | sed -e "s,\${search_name},\L${search_name},g")" curr_curl_url="${apse_uri[$i]}" ||
[ "${curr_curl_url}" = "${apse_uri[$i]}" ] && curr_curl_url="${apse_uri[$i]}${search_name}" curr_curl_url="${apse_uri[$i]}${search_name}"
}
if [ "${apse_put_fields[$i]}" ]; then if [ "${apse_put_fields[$i]}" ]; then
notify.debug "\ notify.debug "\
running: curl $curr_curl_proxy_opts $curr_curl_user_agent_opts -s -L -d \ running: curl \$curr_curl_proxy_opts -s -L -d \
\"${apse_put_fields[$i]}${search_name}\" \"$curr_curl_url\"" \"${apse_put_fields[$i]}${search_name}\" \"$curr_curl_url\""
curl $curr_curl_proxy_opts $curr_curl_user_agent_opts -s -L -d \ curl $curr_curl_proxy_opts -s -L -d \
"${apse_put_fields[$i]}${search_name}" "$curr_curl_url" \ "${apse_put_fields[$i]}${search_name}" "$curr_curl_url" \
> $fcurlout > $fcurlout
else else
notify.debug "\ notify.debug "\
running: curl $curr_curl_proxy_opts $curr_curl_user_agent_opts -s -L \"$curr_curl_url\"" running: curl \$curr_curl_proxy_opts -s -L \"$curr_curl_url\""
curl $curr_curl_proxy_opts $curr_curl_user_agent_opts -s -L "$curr_curl_url" > $fcurlout curl $curr_curl_proxy_opts -s -L "$curr_curl_url" > $fcurlout
fi fi
let "retval = $?" let "retval = $?"
@ -537,13 +535,6 @@ $(echo "${apse_grep[$i]}" | sed -e "s,\${search_name},${search_name},g")"
running: grep -i -m1 \"$current_grep\" \$fcurlout | sed -n \"$current_sed\"" running: grep -i -m1 \"$current_grep\" \$fcurlout | sed -n \"$current_sed\""
new_version="$(\ new_version="$(\
grep -i -m1 "$current_grep" $fcurlout | sed -n "$current_sed")" grep -i -m1 "$current_grep" $fcurlout | sed -n "$current_sed")"
elif [ "${apse_jq[$i]}" ]; then
current_jq="\
$(echo "${apse_jq[$i]}" | sed -e "s,\${search_name},\L${search_name},g")"
notify.debug "\
running: jq \"$current_jq\" \$fcurlout"
new_version="$(\
jq -r "$current_jq" $fcurlout)"
else else
notify.debug "\ notify.debug "\
running: sed -n \"$current_sed\" \$fcurlout" running: sed -n \"$current_sed\" \$fcurlout"
@ -574,7 +565,7 @@ apse.cmpversion \"$last_version\" \"$new_version\""
unset APSE_LAST_VERSION unset APSE_LAST_VERSION
if [ "$last_version" ]; then if [ "$last_version" ]; then
APSE_LAST_VERSION="${last_version/-*}" APSE_LAST_VERSION="${last_version/-/.}"
notify.note $"\ notify.note $"\
last version of \`${NOTE}$specname${NORM}' found:"" \ last version of \`${NOTE}$specname${NORM}' found:"" \
\`${NOTE}${APSE_LAST_VERSION}${NORM}'" \`${NOTE}${APSE_LAST_VERSION}${NORM}'"

View File

@ -23,10 +23,29 @@ libnetwork.lib: "$"library not found"": @libdir@/libtranslate.lib" 1>&2
notify.debug $"loading"": \`libnetwork.lib'..." notify.debug $"loading"": \`libnetwork.lib'..."
# check if all the needed tools are available # check if all the needed tools are available
# note: 'host' has been removed from this list because the package
# bind-utils is not available in early stage platform development
for tool in curl mktemp; do for tool in curl mktemp; do
[ "$(type -p curl)" ] || notify.error $"utility not found"": \`curl'" [ "$(type -p curl)" ] || notify.error $"utility not found"": \`curl'"
done done
# function repository.is_reachable()
# check if the server '$1' is reachable (test = DNS lookup query)
# args:
# $1 : server name
function repository.is_reachable() {
local ftpserver="${1/[a-z]*\:\/\//}"
[ "$ftpserver" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (#1)"
if [ "$(type -p host)" ]; then
host -W3 $ftpserver >&/dev/null
else
notify.warning $"utility not found"": \`host'"
fi
return $?
}
# function repository.get_srpm_pckname_from_site() # function repository.get_srpm_pckname_from_site()
# get the list of SRPM packages by looking at the curl dump of the # get the list of SRPM packages by looking at the curl dump of the
# ftp or html site # ftp or html site
@ -79,7 +98,7 @@ function repository.get_srpm_pckname_from_site() {
notify.debug "$FUNCNAME: infile = \"$infile\"" notify.debug "$FUNCNAME: infile = \"$infile\""
local regexpr local regexpr
[[ "$pck_name" =~ ^[+a-zA-Z0-9_-]+$ ]] && \ [[ "$pck_name" =~ ^[a-zA-Z0-9_-]+$ ]] && \
regexpr="^$pck_name-[^-]\+-[^-]\+$" || regexpr="$pck_name" regexpr="^$pck_name-[^-]\+-[^-]\+$" || regexpr="$pck_name"
notify.debug "$FUNCNAME: regexpr = \"$regexpr\"" notify.debug "$FUNCNAME: regexpr = \"$regexpr\""
@ -88,7 +107,6 @@ function repository.get_srpm_pckname_from_site() {
local pckname_from_HTML=($(sed -n "\ local pckname_from_HTML=($(sed -n "\
# remove HTML tags --> get a better input # remove HTML tags --> get a better input
/<[aA]\+ [hH]\+[rR]\+[eE]\+[fF]\+=\".*\.src\.rpm\"/{ /<[aA]\+ [hH]\+[rR]\+[eE]\+[fF]\+=\".*\.src\.rpm\"/{
s|%2B|+|g;
s|.*<[aA]\+ [hH]\+[rR]\+[eE]\+[fF]\+=\"\([^\"]*\)\".*|\1| s|.*<[aA]\+ [hH]\+[rR]\+[eE]\+[fF]\+=\"\([^\"]*\)\".*|\1|
{/$regexpr/Ip}}" $infile)) {/$regexpr/Ip}}" $infile))
echo "${pckname_from_HTML[*]}" echo "${pckname_from_HTML[*]}"
@ -215,13 +233,13 @@ ${proxy:+ --proxy ***}${proxy_user:+ --proxy-user ***}"
getting list of files from"" \`${NOTE}$currurl/${NORM}'..." getting list of files from"" \`${NOTE}$currurl/${NORM}'..."
case $currurl in case $currurl in
ftp://*|http://*|https://*) ;; ftp://*|http://*) ;;
*) notify.warning $"unsupported query type for this protocol" *) notify.warning $"unsupported query type for this protocol"
let "errors += 1" let "errors += 1"
continue ;; continue ;;
esac esac
currflist="$(mktemp -q -p /var/tmp -t flist.XXXXXXXX)" || currflist="$(mktemp -q -t flist.XXXXXXXX)" ||
notify.error $"can't create temporary files" notify.error $"can't create temporary files"
notify.debug "$FUNCNAME: currflist = $currflist" notify.debug "$FUNCNAME: currflist = $currflist"
@ -232,7 +250,7 @@ getting list of files from"" \`${NOTE}$currurl/${NORM}'..."
notify.debug "$FUNCNAME: curl return code: $retval" notify.debug "$FUNCNAME: curl return code: $retval"
case "$retval" in case "$retval" in
0) sed -i 's/\x0D$//;s/%2B/+/g' $currflist 0) sed -i 's/\x0D$//' $currflist
flist[$i]="$currflist" ;; flist[$i]="$currflist" ;;
6) notify.warning $"couldn't resolve host" 6) notify.warning $"couldn't resolve host"
let "errors += 1" ;; let "errors += 1" ;;
@ -263,7 +281,7 @@ getting list of files from"" \`${NOTE}$currurl/${NORM}'..."
got_SPEC_FILENAME=($(\ got_SPEC_FILENAME=($(\
repository.get_srpm_pckname_from_site --ftp "$pck_name" "${flist[$i]}")) repository.get_srpm_pckname_from_site --ftp "$pck_name" "${flist[$i]}"))
;; ;;
http://*|https://*) http://*)
got_SPEC_FILENAME=($(\ got_SPEC_FILENAME=($(\
repository.get_srpm_pckname_from_site --html "$pck_name" "${flist[$i]}")) repository.get_srpm_pckname_from_site --html "$pck_name" "${flist[$i]}"))
;; ;;
@ -365,7 +383,7 @@ function repository.get_RPMS_name() {
[ "$archlist" ] || notify.error $"\ [ "$archlist" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"no list of architectures set"" (\$archlist)" (bug)"" -- $FUNCNAME: "$"no list of architectures set"" (\$archlist)"
local flist=`mktemp -q -p /var/tmp -t flist.XXXXXXXX` || local flist=`mktemp -q -t flist.XXXXXXXX` ||
notify.error $"can't create temporary files" notify.error $"can't create temporary files"
local curr_arch errors pck_name curr_match local curr_arch errors pck_name curr_match
@ -424,9 +442,9 @@ ${proxy:+ --proxy ***}${proxy_user:+ --proxy-user ***}"
esac esac
if [ -s "$flist" ]; then if [ -s "$flist" ]; then
sed -i 's/\x0D$//;s/%2B/+/g' $flist sed -i 's/\x0D$//' $flist
case $currurl in case $currurl in
ftp://*|http://*|https://*) ftp://*|http://*)
for pck_name in ${pck_names[@]}; do for pck_name in ${pck_names[@]}; do
got_RPM_FILENAME=( ${got_RPM_FILENAME[@]} $(\ got_RPM_FILENAME=( ${got_RPM_FILENAME[@]} $(\
if [ -n "$excludeopt" ]; then if [ -n "$excludeopt" ]; then
@ -771,8 +789,6 @@ action:,directory:,rename-from:,rename-to:,delete:,ftp-passive \
[ "$ftp_passive" ] && options="$options $ftp_passive" [ "$ftp_passive" ] && options="$options $ftp_passive"
[ "${1:0:4}" == "http" ] && http_mode=1
# NOTE: see RFC959 for the sintax of the 'quote' commands # NOTE: see RFC959 for the sintax of the 'quote' commands
# curl --ftp-pasv --user user:password \ # curl --ftp-pasv --user user:password \
# -Q "MKD /devel/old/prova.dir" \ # -Q "MKD /devel/old/prova.dir" \
@ -782,34 +798,21 @@ action:,directory:,rename-from:,rename-to:,delete:,ftp-passive \
mkdir) mkdir)
[ "$directory" ] || notify.error $"\ [ "$directory" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--directory)" (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--directory)"
notify.debug "\
if [ "$http_mode" == "1" ]; then
notify.debug "\
curl $options --user \"***:***\" -X MKCOL $1${directory}/"
curl $options --user "$user" -X MKCOL $1${directory}/ &>/dev/null
else
notify.debug "\
curl $options --user \"***:***\" --quote \"MKD $directory\" $1" curl $options --user \"***:***\" --quote \"MKD $directory\" $1"
curl $options --user "$user" --quote "MKD $directory" $1 &>/dev/null
fi curl $options --user "$user" --quote "MKD $directory" $1 &>/dev/null
;; ;;
rename-file) rename-file)
[ "$fromfile" ] || notify.error $"\ [ "$fromfile" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--rename-from)" (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--rename-from)"
[ "$tofile" ] || notify.error $"\ [ "$tofile" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--rename-to)" (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--rename-to)"
notify.debug "curl $options --user \"***:***\"\
if [ "$http_mode" == "1" ]; then
notify.debug "curl $options --user \"***:***\" -X MOVE\
--header \"Destination:$1$tofile\" $1$fromfile"
curl $options --user "$user" -X MOVE \
--header "Destination:$1$tofile" $1$fromfile &>/dev/null
else
notify.debug "curl $options --user \"***:***\"\
--quote \"RNFR $fromfile\" --quote \"RNTO $tofile\" $1" --quote \"RNFR $fromfile\" --quote \"RNTO $tofile\" $1"
curl $options --user "$user" \
--quote "RNFR $fromfile" --quote "RNTO $tofile" $1 &>/dev/null curl $options --user "$user" \
fi --quote "RNFR $fromfile" --quote "RNTO $tofile" $1 &>/dev/null
;; ;;
delete) delete)
[ "$deletefile" ] || notify.error $"\ [ "$deletefile" ] || notify.error $"\
@ -824,15 +827,9 @@ curl $options --user \"***:***\" --quote \"MKD $directory\" $1"
# curl -v --ftp-pasv --user "$user" \ # curl -v --ftp-pasv --user "$user" \
# --quote "DELE SRPMS.base/filename-0.0.1-1distro.src.rpm" \ # --quote "DELE SRPMS.base/filename-0.0.1-1distro.src.rpm" \
# ftp://ftpaccounts.openmamba.org # ftp://ftpaccounts.openmamba.org
if [ "$http_mode" == "1" ]; then notify.debug "\
notify.debug "\
curl $options --user \"***:***\" -X DELETE $1$deletefile"
curl $options --user "$user" -X DELETE $1$deletefile &>/dev/null
else
notify.debug "\
curl $options --user \"***:***\" --quote \"DELE $deletefile\" $1" curl $options --user \"***:***\" --quote \"DELE $deletefile\" $1"
curl $options --user "$user" --quote "DELE $deletefile" $1 &>/dev/null curl $options --user "$user" --quote "DELE $deletefile" $1 &>/dev/null
fi
;; ;;
*) notify.error $"\ *) notify.error $"\
(bug)"" -- $FUNCNAME: "$"unknown action"": ($action)" (bug)"" -- $FUNCNAME: "$"unknown action"": ($action)"
@ -855,7 +852,6 @@ curl $options --user \"***:***\" --quote \"DELE $deletefile\" $1"
# -d, --destdir : target directory # -d, --destdir : target directory
# -p, --proxy : proxy server # -p, --proxy : proxy server
# -u, --proxy-user : proxy user # -u, --proxy-user : proxy user
# --preserve-dot-git : do not remove .git files
# $@ : git repository # $@ : git repository
# #
# return value: # return value:
@ -864,15 +860,14 @@ curl $options --user \"***:***\" --quote \"DELE $deletefile\" $1"
function git.download() { function git.download() {
local ARGS local ARGS
ARGS=`LC_ALL=C getopt \ ARGS=`LC_ALL=C getopt \
-o d:v:p:u:k \ -o d:v:p:u: \
--long destdir:,pck-version:,proxy:,proxy-user:,preserve-dot-git: \ --long destdir:,pck-version:,proxy:,proxy-user: \
-n "$FUNCNAME" -- "$@"` -n "$FUNCNAME" -- "$@"`
[ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error" [ $? = 0 ] || notify.error $"(bug)"" -- $FUNCNAME: "$"\`getopt' error"
local destdir local destdir
local proxy proxy_user local proxy proxy_user
local pck_version local pck_version
local preserve_dot_git=0
eval set -- "$ARGS" eval set -- "$ARGS"
while :; do while :; do
@ -893,10 +888,6 @@ function git.download() {
proxy_user="$2"; shift proxy_user="$2"; shift
notify.debug "$FUNCNAME: proxy_user = \"$proxy_user\"" notify.debug "$FUNCNAME: proxy_user = \"$proxy_user\""
;; ;;
--preserve-dot-git)
preserve_dot_git="$2"; shift
notify.debug "$FUNCNAME: preserve_dot_git = \"$preserve_dot_git\""
;;
--) shift; break;; --) shift; break;;
*) notify.error $"\ *) notify.error $"\
(bug)"" -- $FUNCNAME: "$"\`getopt' error: bad command \`$1'" ;; (bug)"" -- $FUNCNAME: "$"\`getopt' error: bad command \`$1'" ;;
@ -918,30 +909,19 @@ function git.download() {
notify.debug "$FUNCNAME: token_dirname = \"$token_dirname\"" notify.debug "$FUNCNAME: token_dirname = \"$token_dirname\""
notify.debug "$FUNCNAME: token_basename = \"$token_basename\"" notify.debug "$FUNCNAME: token_basename = \"$token_basename\""
if [ -e $destdir/$token_basename ]; then
if [ "$force_download" = "0" ]; then
notify.note "[${filenum:-*}] $NOTE$token_basename$NORM ... "$"skipped"
return 0
fi
fi
local git_branch="${token_dirname/*\/}" local git_branch="${token_dirname/*\/}"
notify.debug "$FUNCNAME: git_branch = \"$git_branch\"" notify.debug "$FUNCNAME: git_branch = \"$git_branch\""
git.create_tarball \ git.create_tarball \
--pck-version "$pck_version" \ --pck-version "$pck_version" \
--destdir "$destdir" \ --destdir "$destdir" \
--preserve-dot-git "${preserve_dot_git}" --git-branch "$git_branch" \ --preserve-dot-git "0" --git-branch "$git_branch" \
"${token_dirname/\/$git_branch*}" "${token_dirname/.git*}.git"
} }
# function git.urldecode
# url decodes a given string
function git.urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
# function git.create_tarball # function git.create_tarball
# clone a git repository and convert is into a tarball file # clone a git repository and convert is into a tarball file
# #
# args: # args:
# -d,--destdir : target directory # -d,--destdir : target directory
# -v,--pck-version : package version # -v,--pck-version : package version
@ -967,7 +947,6 @@ function git.create_tarball() {
# see: http://bardofschool.blogspot.fr/2008/11/use-git-behind-proxy.html # see: http://bardofschool.blogspot.fr/2008/11/use-git-behind-proxy.html
local proxy proxy_user local proxy proxy_user
local git_branch local git_branch
local git_commit
local preserve_dot_git=0 local preserve_dot_git=0
local pck_version local pck_version
@ -983,18 +962,8 @@ function git.create_tarball() {
notify.debug "$FUNCNAME: pck_version = \"$pck_version\"" notify.debug "$FUNCNAME: pck_version = \"$pck_version\""
;; ;;
--git-branch) --git-branch)
git_branch="`git.urldecode "$2"`"; shift git_branch="$2"; shift
if [ "${git_branch/@*}" != "${git_branch}" ]; then
git_commit="${git_branch/*@}"
git_branch="${git_branch/@*}"
if [ ! "${git_commit}" ]; then
notify.error "$FUNCNAME: cannot checkout empty commit"
fi
fi
notify.debug "$FUNCNAME: git_branch = \"$git_branch\"" notify.debug "$FUNCNAME: git_branch = \"$git_branch\""
if [ "${git_commit}" ]; then
notify.debug "$FUNCNAME: git_commit = \"$git_commit\""
fi
;; ;;
--preserve-dot-git) --preserve-dot-git)
preserve_dot_git="$2"; shift preserve_dot_git="$2"; shift
@ -1023,10 +992,20 @@ function git.create_tarball() {
[ "$destdir" ] || notify.error $"\ [ "$destdir" ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--destdir)" (bug)"" -- $FUNCNAME: "$"missing mandatory arg"" (--destdir)"
local today="$(date "+%Y%m%d")"
if [ "$pck_version" ]; then
[ "$pck_version" = "${today}git" ] || notify.warning "\
${NOTE}${pck_version}${NORM}: "$"\
not the expected package version"" (${NOTE}${today}git${NORM})..."
else
pck_version="${today}git"
notify.debug "$FUNCNAME: pck_version = \"$pck_version\""
fi
type -p git &>/dev/null || type -p git &>/dev/null ||
notify.error $"utility not found"": \`git'" notify.error $"utility not found"": \`git'"
local tmpgitdir=$(mktemp -q -d -p /var/tmp -t tmpgit.XXXXXXXX) local tmpgitdir=$(mktemp -q -d -t tmpgit.XXXXXXXX)
[ $? -eq 0 ] || [ $? -eq 0 ] ||
notify.error $"can't create temporary files" notify.error $"can't create temporary files"
notify.debug "$FUNCNAME: tmpgitdir = $tmpgitdir" notify.debug "$FUNCNAME: tmpgitdir = $tmpgitdir"
@ -1037,12 +1016,12 @@ function git.create_tarball() {
notify.note \ notify.note \
"${NOTE}"$"cloning git repository""\ "${NOTE}"$"cloning git repository""\
<$git_repository> ${git_branch:+($git_branch)}${NORM}""..." <$git_repository> ${git_branch:+($git_branch)}${NORM}""..."
if [ "$preserve_dot_git" = "0" -a "${git_repository:0:4}" != "http" -a ! "${git_commit}" ]; then if [ "$preserve_dot_git" = "0" -a "${git_repository:0:4}" != "http" ]; then
notify.debug "$FUNCNAME: git clone --recursive --depth=1 ${git_branch:+-b $git_branch} \"$git_repository\"" notify.debug "$FUNCNAME: git clone --depth=1 ${git_branch:+-b $git_branch} \"$git_repository\""
git clone --recursive --depth=1 ${git_branch:+-b $git_branch} "$git_repository" git clone --depth=1 ${git_branch:+-b $git_branch} "$git_repository"
else else
notify.debug "$FUNCNAME: git clone --recursive ${git_branch:+-b $git_branch} \"$git_repository\"" notify.debug "$FUNCNAME: git clone ${git_branch:+-b $git_branch} \"$git_repository\""
git clone --recursive ${git_branch:+-b $git_branch} "$git_repository" git clone ${git_branch:+-b $git_branch} "$git_repository"
fi fi
[ $? -eq 0 ] || [ $? -eq 0 ] ||
{ popd &>/dev/null { popd &>/dev/null
@ -1051,16 +1030,6 @@ function git.create_tarball() {
pck_tarball="$(find -mindepth 1 -maxdepth 1 -type d -printf "%f")" pck_tarball="$(find -mindepth 1 -maxdepth 1 -type d -printf "%f")"
if [ "${git_commit}" ]; then
cd ${pck_tarball}
git checkout ${git_commit} || {
popd &>/dev/null
rm -fr $tmpgitdir
notify.error $"cannot checkout the specified tag";
}
cd ..
fi
if [ "$preserve_dot_git" = "0" ]; then if [ "$preserve_dot_git" = "0" ]; then
# remove git files # remove git files
rm -fr $pck_tarball/.git rm -fr $pck_tarball/.git

View File

@ -632,26 +632,17 @@ $FUNCNAME: specfile_preprocessed = \"$specfile_preprocessed\""
shift shift
done done
local tmpspreprerr=$(mktemp -q -p /var/tmp -t $me.XXXXXXXX) local tmpspreprerr=$(mktemp -q -t $me.XXXXXXXX)
[ $? -eq 0 ] || [ $? -eq 0 ] ||
notify.error "$FUNCNAME: "$"can't create temporary files" notify.error "$FUNCNAME: "$"can't create temporary files"
notify.debug "$FUNCNAME: tmpspreprerr = \`${NOTE}$tmpspreprerr${NORM}'" notify.debug "$FUNCNAME: tmpspreprerr = \`${NOTE}$tmpspreprerr${NORM}'"
if [ "${rpm_version:0:2}" == "5." ]; then notify.debug "\
notify.debug "\
$FUNCNAME: running: rpm -q $rpm_options --specfile --specedit $specfile ..." $FUNCNAME: running: rpm -q $rpm_options --specfile --specedit $specfile ..."
eval "\ eval "\
rpm -q $rpm_options --specfile --specedit $specfile \ rpm -q $rpm_options --specfile --specedit $specfile \
> $specfile_preprocessed 2> $tmpspreprerr" > $specfile_preprocessed 2> $tmpspreprerr"
else
notify.debug "\
$FUNCNAME: running: rpmspec $rpm_options -P $specfile ..."
eval "\
rpmspec $rpm_options -P $specfile \
> $specfile_preprocessed 2> $tmpspreprerr"
fi
if [ -s "$tmpspreprerr" ]; then if [ -s "$tmpspreprerr" ]; then
notify.warning $"\ notify.warning $"\
@ -1132,21 +1123,15 @@ rpmvars.solve "$filesname" "$specfile")" )
esac esac
notify.debug "$FUNCNAME: $var = ( ${SPEC_TARGET[*]} )" notify.debug "$FUNCNAME: $var = ( ${SPEC_TARGET[*]} )"
;; ;;
*) if [[ -n "$rpm_macro_debug_package" && \
"${tok[0]}" = "$rpm_macro_debug_package" ]]; then
# rpm macro for creating debug packages
SPEC_TARGET=( ${SPEC_TARGET[@]} \
"${SPEC_NAME}-${rpm_macro_debug_package_suffix}" )
fi
;;
esac esac
done < $specfile done < $specfile
# Add debug package to SPEC_TARGET list if found
if [ "${SPEC_BUILDARCH:-$BUILD_ARCH}" == "noarch" ]; then
dbg_filename="$(package.generate_name -p -a noarch -t rpm \
-n ${SPEC_NAME}-${rpm_macro_debug_package_suffix} -v ${SPEC_VERSION} -r ${SPEC_RELEASE%%[^0-9\.]*})"
else
dbg_filename="$(package.generate_name -p -a ${SPEC_BUILDARCH:-$BUILD_ARCH} -t rpm \
-n ${SPEC_NAME}-${rpm_macro_debug_package_suffix} -v ${SPEC_VERSION} -r ${SPEC_RELEASE%%[^0-9\.]*})"
fi
if [[ -e "$dbg_filename" ]]; then
# rpm macro for creating debug packages
SPEC_TARGET=( ${SPEC_TARGET[@]} \
"${SPEC_NAME}-${rpm_macro_debug_package_suffix}" )
fi
#notify.debug "$FUNCNAME: $var = ( ${SPEC_TARGET[*]} )" #notify.debug "$FUNCNAME: $var = ( ${SPEC_TARGET[*]} )"
;; ;;
SPEC_OBSOLETES) SPEC_OBSOLETES)

View File

@ -48,8 +48,8 @@ esterni ma piuttosto come ulteriore modularizzazione del codice.
.B @package@ .B @package@
e' stato utilizzato con successo dagli sviluppatori della distribuzione e' stato utilizzato con successo dagli sviluppatori della distribuzione
.B openmamba .B QiLinux
(\fIhttps://openmamba.org\fP), permettendo la creazione di specfile standard e (\fIhttp://www.qilinux.org\fP), permettendo la creazione di specfile standard e
l'aggiornamento (semi)automatico dei pacchetti. l'aggiornamento (semi)automatico dei pacchetti.
E' utilizzato attualmente nello sviluppo di E' utilizzato attualmente nello sviluppo di
.B openmamba GNU/Linux .B openmamba GNU/Linux
@ -88,7 +88,7 @@ ftp_rw_user[1]="<user>"
.TP .TP
ftp_rw_passwd[1]="<passwd>" ftp_rw_passwd[1]="<passwd>"
.TP .TP
arch_list=(i586 arm x86_64 aarch64) arch_list=(i586 ppc arm x86_64)
.TP .TP
curl_opts_netlink="--connect-timeout 15 --retry 3 --limit-rate 250k" curl_opts_netlink="--connect-timeout 15 --retry 3 --limit-rate 250k"
.PD .PD
@ -200,6 +200,10 @@ categoria dello specfile da generare:
.br .br
\fIgnome\fR : specfile per pacchetti gnome \fIgnome\fR : specfile per pacchetti gnome
.br .br
\fIkde3\fR : specfile per pacchetti kde3
.br
\fIkde4\fR : specfile per pacchetti kde4
.br
\fIkde5\fR : specfile per pacchetti kde5 \fIkde5\fR : specfile per pacchetti kde5
.br .br
\fIlibrary\fR : specfile per librerie \fIlibrary\fR : specfile per librerie

View File

@ -66,7 +66,6 @@ function usage() {
"$"Samples"": "$"Samples"":
@frontend@ -q -C ${default_cfg_list[0]} --eval=\"logging_dir\" @frontend@ -q -C ${default_cfg_list[0]} --eval=\"logging_dir\"
@frontend@ --eval rpm_allowed_groups @frontend@ --eval rpm_allowed_groups
@frontend@ --eval rpm_approved_licenses
"$"Report bugs to <davide.madrisan@gmail.com>." "$"Report bugs to <davide.madrisan@gmail.com>."

View File

@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
# pck-extract -- plugin for @package@ # pck-extract -- plugin for @package@
# Copyright (C) 2004-2010 Davide Madrisan <davide.madrisan@gmail.com> # Copyright (C) 2004-2010 Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2024 Silvan Calarco <silvan.calarco@mambasoft.it>
[ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 3 ] && [ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 3 ] &&
{ echo $"this script requires bash version 3 or better" >&2 && exit 1; } { echo $"this script requires bash version 3 or better" >&2 && exit 1; }
@ -174,16 +173,16 @@ notify.enable_colors "$color_scheme"
notify.note "[${NOTE}$s_rpm_pck${NORM}]" notify.note "[${NOTE}$s_rpm_pck${NORM}]"
# check if all the needed tools are available # check if all the needed tools are available
for tool in bunzip2 tar gunzip mktemp rpm2archive; do for tool in bunzip2 cpio gunzip mktemp rpm2cpio; do
[ "$(type -p $tool)" ] || [ "$(type -p $tool)" ] ||
notify.error $"utility not found"": \`$tool'" notify.error $"utility not found"": \`$tool'"
done done
tmparchivedir=$(mktemp -q -d -p /var/tmp -t $me.XXXXXXXX) tmpcpiodir=$(mktemp -q -d -t $me.XXXXXXXX)
[ $? -eq 0 ] && [ $? -eq 0 ] &&
trap "rm -fr $tmparchivedir" 0 1 2 3 6 7 9 13 15 || trap "rm -fr $tmpcpiodir" 0 1 2 3 6 7 9 13 15 ||
notify.error $"can't create temporary files" notify.error $"can't create temporary files"
notify.debug "$FUNCNAME: tmparchivedir = $tmparchivedir" notify.debug "$FUNCNAME: tmpcpiodir = $tmpcpiodir"
#local s_rpm_pck_name #local s_rpm_pck_name
case "$s_rpm_pck" in case "$s_rpm_pck" in
@ -194,9 +193,9 @@ http://*\.src\.*|http://*\.nosrc\.*|ftp://*\.src\.*|ftp://*\.nosrc\.*)
curl.download \ curl.download \
--options "$curl_options" \ --options "$curl_options" \
${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \ ${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
--exit-on-err --destdir="$tmparchivedir" "$s_rpm_pck" --exit-on-err --destdir="$tmpcpiodir" "$s_rpm_pck"
s_rpm_pck="$tmparchivedir/$s_rpm_pck_name" s_rpm_pck="$tmpcpiodir/$s_rpm_pck_name"
;; ;;
*\.src\.*|*\.nosrc\.*) *\.src\.*|*\.nosrc\.*)
s_rpm_pck_name="$s_rpm_pck" s_rpm_pck_name="$s_rpm_pck"
@ -213,37 +212,46 @@ mkdir -p $destdir 2>/dev/null || notify.error $"cannot create \`$destdir'"
#local errcode #local errcode
#local \ #local \
tmparchivepck="srpm_pck.tar.gz" tmpcpiopck="srpm_pck.cpio"
notify.debug "\ notify.debug "\
$FUNCNAME: converting the rpm package into a tar.gz archive..." $FUNCNAME: converting the rpm package into a cpio archive..."
rpm2archive $s_rpm_pck > $tmparchivedir/$tmparchivepck rpm2cpio $s_rpm_pck > $tmpcpiodir/$tmpcpiopck
let "errcode = $?" let "errcode = $?"
[ "$errcode" = 0 ] || [ "$errcode" = 0 ] ||
{ rm -fr $tmparchivedir { rm -fr $tmpcpiodir
notify.debug "$FUNCNAME: exit code of rpm2archive = \`$errcode'" notify.debug "$FUNCNAME: exit code of rpm2cpio = \`$errcode'"
notify.error $"can't save extracted files to \`$destdir'"; } notify.error $"can't save extracted files to \`$destdir'"; }
notify.debug "\ notify.debug "\
$FUNCNAME: extracting files from the tar.gz archive..." $FUNCNAME: extracting files from the cpio archive..."
pushd $tmparchivedir &>/dev/null pushd $tmpcpiodir &>/dev/null
tar xzf $tmparchivedir/$tmparchivepck
cpio --quiet --extract --preserve-modification-time \
< $tmpcpiodir/$tmpcpiopck
let "errcode = $?" let "errcode = $?"
[ "$errcode" = 0 ] || [ "$errcode" = 0 ] ||
{ rm -fr $tmparchivedir { rm -fr $tmpcpiodir
notify.debug "$FUNCNAME: exit code of tar = \`$errcode'" notify.debug "$FUNCNAME: exit code of cpio = \`$errcode'"
notify.error $"can't save extracted files to \`$destdir'"; } notify.error $"can't save extracted files to \`$destdir'"; }
rm -f $tmparchivedir/$tmparchivepck rm -f $tmpcpiodir/$tmpcpiopck
#notify.debug "\
#$FUNCNAME: extracting files from the srpm archive..."
#
#rpm2cpio $s_rpm_pck 2>/dev/null | \
#cpio --quiet --extract $filelst &>/dev/null
#[ $? -ne 0 ] &&
# { popd &>/dev/null
# notify.error $"can't save extracted files to \`$destdir'"; }
popd &>/dev/null popd &>/dev/null
#local fname #local fname
for f in $tmparchivedir/${filelst:-*}; do for f in $tmpcpiodir/${filelst:-*}; do
fname=${f##*/} fname=${f##*/}
notify.debug "$FUNCNAME: fname = \"$fname\"" notify.debug "$FUNCNAME: fname = \"$fname\""
case $fname in case $fname in
@ -253,7 +261,7 @@ for f in $tmparchivedir/${filelst:-*}; do
notify.debug "$FUNCNAME: decompressing the patch..." notify.debug "$FUNCNAME: decompressing the patch..."
bunzip2 $f &>/dev/null bunzip2 $f &>/dev/null
[ $? -eq 0 ] || [ $? -eq 0 ] ||
{ rm -fr $tmparchivedir { rm -fr $tmpcpiodir
notify.warning $"can't decompress the file"" \`$f'"; } notify.warning $"can't decompress the file"" \`$f'"; }
notify.note " * ${NOTE}$destdir/${fname/\.bz2/}${NORM}" notify.note " * ${NOTE}$destdir/${fname/\.bz2/}${NORM}"
@ -263,7 +271,7 @@ for f in $tmparchivedir/${filelst:-*}; do
notify.debug "$FUNCNAME: decompressing the patch..." notify.debug "$FUNCNAME: decompressing the patch..."
gunzip $f &>/dev/null gunzip $f &>/dev/null
[ $? -eq 0 ] || [ $? -eq 0 ] ||
{ rm -fr $tmparchivedir { rm -fr $tmpcpiodir
notify.warning $"can't decompress the file"" \`$f'"; } notify.warning $"can't decompress the file"" \`$f'"; }
notify.note " * ${NOTE}$destdir/${fname/\.gz/}${NORM}" notify.note " * ${NOTE}$destdir/${fname/\.gz/}${NORM}"
@ -275,8 +283,8 @@ for f in $tmparchivedir/${filelst:-*}; do
;; ;;
esac esac
[ $? -eq 0 ] || [ $? -eq 0 ] ||
{ rm -fr $tmparchivedir { rm -fr $tmpcpiodir
notify.error $"can't save files to \`$destdir'"; } notify.error $"can't save files to \`$destdir'"; }
done done
rm -fr $tmparchivedir rm -fr $tmpcpiodir

View File

@ -34,7 +34,6 @@ me=(${0##*/} "@version@" "@date@")
# output verbosity # output verbosity
let "verbose = 1" let "verbose = 1"
# #
let "noprep = 0"
let "cleanup = 0" let "cleanup = 0"
let "spec_format = 0" let "spec_format = 0"
let "rebuild = 0" let "rebuild = 0"
@ -98,7 +97,7 @@ function usage() {
[--packager-email \"email@domain\" ] [--nosrpm|--norpm] \\ [--packager-email \"email@domain\" ] [--nosrpm|--norpm] \\
[--force-update] [--force-build] [--force-install] \\ [--force-update] [--force-build] [--force-install] \\
[--force-download] [--ignore-test t1[,t2,...]] \\ [--force-download] [--ignore-test t1[,t2,...]] \\
[-p] [-c] [-f] [-L] [-R] [-C <conf_file>] [-c] [-f] [-L] [-R] [-C <conf_file>]
"$"where the above options mean"": "$"where the above options mean"":
-u, --update "$"Update the package <pck> to version <ver> and release <rel>"" -u, --update "$"Update the package <pck> to version <ver> and release <rel>""
@ -139,8 +138,6 @@ function usage() {
"$"Override packager full name"" "$"Override packager full name""
--packager-email --packager-email
"$"Override packager email"" "$"Override packager email""
--distro-rpm
"$"Override release append tag (predefined: $DISTRO_rpm)""
--nosrpm "$"action"" 5: "$"Only build the rpm packages"" --nosrpm "$"action"" 5: "$"Only build the rpm packages""
"$"action"" 10: "$"Do not upload the srpm package"" "$"action"" 10: "$"Do not upload the srpm package""
--norpm "$"action"" 5: "$"Only build the srpm package"" --norpm "$"action"" 5: "$"Only build the srpm package""
@ -148,7 +145,6 @@ function usage() {
--list-check "$"action"" 5: "$"Do a \`list check'"" --list-check "$"action"" 5: "$"Do a \`list check'""
-b, --update-autobuildreq"" -b, --update-autobuildreq""
"$"action"" 6: "$"Replace the block AUTOBUILDREQ"" "$"action"" 6: "$"Replace the block AUTOBUILDREQ""
-p, --noprep "$"Skip rpmbuild %prep macro when retrying building from an existing builddir""
-c, --clear "$"Remove all the temporary files except (s)rpm packages"" -c, --clear "$"Remove all the temporary files except (s)rpm packages""
-f, --format "$"Enable specfile autoformatting"" -f, --format "$"Enable specfile autoformatting""
-L, --log "$"Unable logging to file (logging dir: \`\$logging_dir')"" -L, --log "$"Unable logging to file (logging dir: \`\$logging_dir')""
@ -198,14 +194,14 @@ for arg in $@; do
done done
exec_options=`LC_ALL=C getopt \ exec_options=`LC_ALL=C getopt \
-o ua:d:l:S:A:pbcfLRC:DqhV \ -o ua:d:l:S:A:bcfLRC:DqhV \
--long \ --long \
update,action:,define:,login:,specfile:,arch:,\ update,action:,define:,login:,specfile:,arch:,\
server-download:,server-upload:,server:,\ server-download:,server-upload:,server:,\
changelog:,packager-fullname:,packager-email:,distro-rpm:,\ changelog:,packager-fullname:,packager-email:,\
nosrpm,norpm,list-check,update-autobuildreq,\ nosrpm,norpm,list-check,update-autobuildreq,\
force-update,force-build,force-install,force-download,force,\ force-update,force-build,force-install,force-download,force,\
ignore-test:,noprep,clear,format,log,rebuild,root:,\ ignore-test:,clear,format,log,rebuild,root:,\
frontend_opts:,colors:,config:,\ frontend_opts:,colors:,config:,\
debug,quiet,help,version \ debug,quiet,help,version \
-n "$me" -- "$@"` -n "$me" -- "$@"`
@ -256,9 +252,6 @@ while :; do
--packager-email) --packager-email)
packager_email="$2"; shift packager_email="$2"; shift
cmdline_vars[${#cmdline_vars[*]}]="packager_email=\"$packager_email\"" ;; cmdline_vars[${#cmdline_vars[*]}]="packager_email=\"$packager_email\"" ;;
--distro-rpm)
DISTRO_rpm="$2"; shift
cmdline_vars[${#cmdline_vars[*]}]="DISTRO_rpm=\"$DISTRO_rpm\"" ;;
--nosrpm) --nosrpm)
let "nosrpm = 1" ;; let "nosrpm = 1" ;;
--norpm) --norpm)
@ -283,8 +276,6 @@ while :; do
let "force_upload = 1" ;; let "force_upload = 1" ;;
--ignore-test) --ignore-test)
ignore_test_list=$2; shift ;; ignore_test_list=$2; shift ;;
-p|--noprep)
noprep=1 ;;
-c|--clear) -c|--clear)
cleanup=1 ;; cleanup=1 ;;
-f|--format) -f|--format)
@ -411,11 +402,11 @@ $"illegal value"": \"$ftp_rw_server_num_default\""
# display users and passwords in the debug messages (default: '0') # display users and passwords in the debug messages (default: '0')
debug_print_private_user_infos=0 debug_print_private_user_infos=0
infofile=$(mktemp -q -p /var/tmp -t infofile.XXXXXXXX) infofile=$(mktemp -q -t infofile.XXXXXXXX)
[ $? -eq 0 ] || notify.error $"can't create temporary files" [ $? -eq 0 ] || notify.error $"can't create temporary files"
# preprocessed specfile generated by 'rpm --specfile --specedit' # preprocessed specfile generated by 'rpm --specfile --specedit'
specfile_preprocessed=$(mktemp -q -p /var/tmp -t specpreproc.XXXXXXXX) specfile_preprocessed=$(mktemp -q -t specpreproc.XXXXXXXX)
[ $? -eq 0 ] || notify.error $"can't create temporary files" [ $? -eq 0 ] || notify.error $"can't create temporary files"
trap "rm -f $infofile $specfile_preprocessed" 0 1 2 3 6 7 9 13 15 trap "rm -f $infofile $specfile_preprocessed" 0 1 2 3 6 7 9 13 15
@ -548,9 +539,9 @@ done)"
[ "$SPEC_PATCH" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_PATCH [ "$SPEC_PATCH" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_PATCH
[ "$SPEC_SOURCE" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_SOURCE [ "$SPEC_SOURCE" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_SOURCE
[ "$SPEC_LICENSE" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_LICENSE [ "$SPEC_LICENSE" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_LICENSE
[ "$SPEC_BUILDARCH" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_BUILDARCH
[ "$SPEC_TARGET" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_TARGET [ "$SPEC_TARGET" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_TARGET
[ "$SPEC_OBSOLETES" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_OBSOLETES [ "$SPEC_OBSOLETES" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_OBSOLETES
[ "$SPEC_BUILDARCH" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_BUILDARCH
[ "$SPEC_BUILDREQUIRES" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_BUILDREQUIRES [ "$SPEC_BUILDREQUIRES" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_BUILDREQUIRES
[ "$SPEC_BUILDROOT" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_BUILDROOT [ "$SPEC_BUILDROOT" ] || specfile.getvars -s $SPECFILE_PREPROCESSED SPEC_BUILDROOT
@ -1213,20 +1204,10 @@ rpmvars.solve "$fullURL_new" "$SRPM_SPECFILE_WITH_PATH")
notify.debug "fullURL_new = $fullURL_new" notify.debug "fullURL_new = $fullURL_new"
case "$fullURL_new" in case "$fullURL_new" in
http+git://*|https+git://*)
fullURL_new="${fullURL_new/+git}"
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \
git.download \
--pck-version "$pck_newver" \
--destdir="$source_dir" "$fullURL_new" \
--preserve-dot-git 1
;;
git://*|http://*.git/*|https://*.git/*) git://*|http://*.git/*|https://*.git/*)
fullURL_new="${fullURL_new/+git}" git.download \
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \ --pck-version "$pck_newver" \
git.download \ --destdir="$source_dir" "$fullURL_new"
--pck-version "$pck_newver" \
--destdir="$source_dir" "$fullURL_new"
;; ;;
*) curl.download --options "$curl_options" $sdflag \ *) curl.download --options "$curl_options" $sdflag \
${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \ ${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
@ -1345,7 +1326,7 @@ illegal \`format_extra_rules' (see configuration file(s))"
local sharedstatedir=`rpm --eval=%{_sharedstatedir}` local sharedstatedir=`rpm --eval=%{_sharedstatedir}`
local sysconfdir=`rpm --eval=%{_sysconfdir}` local sysconfdir=`rpm --eval=%{_sysconfdir}`
local tmpspec=$(mktemp -q -p /var/tmp -t $me.XXXXXXXX) local tmpspec=$(mktemp -q -t $me.XXXXXXXX)
[ $? -eq 0 ] || [ $? -eq 0 ] ||
notify.error $"can't create temporary files" notify.error $"can't create temporary files"
notify.debug "tmpspec = \`${NOTE}$tmpspec${NORM}'" notify.debug "tmpspec = \`${NOTE}$tmpspec${NORM}'"
@ -1482,7 +1463,7 @@ for i in $(seq 1 1 ${#spec_lines[@]}); do
echo -n "\n ${spec_lines[$i-1]}" echo -n "\n ${spec_lines[$i-1]}"
done)" done)"
local tmppreamble=$(mktemp -q -p /var/tmp -t $me.XXXXXXXX) local tmppreamble=$(mktemp -q -t $me.XXXXXXXX)
[ $? -eq 0 ] || [ $? -eq 0 ] ||
notify.error $"can't create temporary files" notify.error $"can't create temporary files"
notify.debug "tmppreamble = \`${NOTE}$tmppreamble${NORM}'" notify.debug "tmppreamble = \`${NOTE}$tmppreamble${NORM}'"
@ -2041,7 +2022,7 @@ installing missing build requirement"": \`${NOTE}$f${NORM}'"
else else
$rpm_download_and_install ${buildreqs_to_install[*]} $rpm_download_and_install ${buildreqs_to_install[*]}
fi fi
[ $? -eq 0 ] || notify.warning $"\ [ $? -eq 0 ] || notify.error $"\
cannot install the needed build requirements" cannot install the needed build requirements"
else else
notify.error $"\ notify.error $"\
@ -2070,16 +2051,7 @@ rpmvars.solve "$fullURL" "$SRPM_SPECFILE_WITH_PATH")
notify.debug "fullURL = $fullURL" notify.debug "fullURL = $fullURL"
case "$fullURL" in case "$fullURL" in
http+git://*|https+git://*)
fullURL="${fullURL/+git}"
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \
git.download \
--pck-version "$pck_rpmversion" \
--destdir="$source_dir" "$fullURL" \
--preserve-dot-git 1
;;
git://*|http://*.git/*|https://*.git/*) git://*|http://*.git/*|https://*.git/*)
fullURL="${fullURL/+git}"
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \ [ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \
git.download \ git.download \
--pck-version "$pck_rpmversion" \ --pck-version "$pck_rpmversion" \
@ -2116,8 +2088,7 @@ ${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
--define=\"%_specdir $spec_dir\" \ --define=\"%_specdir $spec_dir\" \
--define=\"%_sourcedir $source_dir\" \ --define=\"%_sourcedir $source_dir\" \
--define=\"%_builddir $build_dir\" \ --define=\"%_builddir $build_dir\" \
--define=\"%_tmppath $tmppath_dir\" \ --define=\"%_tmppath $tmppath_dir\""
--define=\"%_buildrootdir $tmppath_dir\""
# [ "$rpm_rootdir" ] && # [ "$rpm_rootdir" ] &&
# rpmbuild_opts="$rpmbuild_opts $rpm_root_opts" # rpmbuild_opts="$rpmbuild_opts $rpm_root_opts"
@ -2126,8 +2097,6 @@ ${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
[ "$BUILD_ARCH" != "$target_cpu" ] && [ "$BUILD_ARCH" != "$target_cpu" ] &&
USER_RPMDEFINE_OPTS="--target $target_cpu $USER_RPMDEFINE_OPTS" USER_RPMDEFINE_OPTS="--target $target_cpu $USER_RPMDEFINE_OPTS"
[ "$noprep" = "1" ] && rpmbuild_opts="$rpmbuild_opts --noprep"
[ "$cleanup" = "1" ] && rpmbuild_opts="$rpmbuild_opts --clean" [ "$cleanup" = "1" ] && rpmbuild_opts="$rpmbuild_opts --clean"
# note: exit with error when build requirements are missing # note: exit with error when build requirements are missing
@ -2136,6 +2105,7 @@ ${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
$USER_RPMDEFINE_OPTS $rpmbuild_opts $rpm_root_opts \ $USER_RPMDEFINE_OPTS $rpmbuild_opts $rpm_root_opts \
$SRPM_SPECFILE_WITH_PATH 2>&1" || $SRPM_SPECFILE_WITH_PATH 2>&1" ||
notify.error $"rpmbuild exited with error code":" \`$?'" notify.error $"rpmbuild exited with error code":" \`$?'"
notify.debug "define_list_name = (${define_list_name[*]})" notify.debug "define_list_name = (${define_list_name[*]})"
notify.debug "define_list_value = (${define_list_value[*]})" notify.debug "define_list_value = (${define_list_value[*]})"
@ -2179,17 +2149,17 @@ $SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1"
# as the dependencies check is done before, it is safe to pass # as the dependencies check is done before, it is safe to pass
# --nodeps to non-simulated build commands. # --nodeps to non-simulated build commands.
eval "\ eval "\
rpmbuild -bs $USER_RPMDEFINE_OPTS $rpmbuild_opts \ rpmbuild -bs $USER_RPMDEFINE_OPTS $rpmbuild_opts --nodeps \
$SRPM_SPECFILE_WITH_PATH 2>&1" $SRPM_SPECFILE_WITH_PATH 2>&1"
elif [ "$nosrpm" = 1 ]; then elif [ "$nosrpm" = 1 ]; then
notify.note "${NOTE}"$"building the rpm packages""${NORM}..." notify.note "${NOTE}"$"building the rpm packages""${NORM}..."
eval "\ eval "\
rpmbuild -bb $USER_RPMDEFINE_OPTS $rpmbuild_opts \ rpmbuild -bb $USER_RPMDEFINE_OPTS $rpmbuild_opts --nodeps \
$SRPM_SPECFILE_WITH_PATH 2>&1" $SRPM_SPECFILE_WITH_PATH 2>&1"
else else
notify.note "${NOTE}"$"building rpm and srpm packages""${NORM}..." notify.note "${NOTE}"$"building rpm and srpm packages""${NORM}..."
eval "\ eval "\
rpmbuild -ba $USER_RPMDEFINE_OPTS $rpmbuild_opts \ rpmbuild -ba $USER_RPMDEFINE_OPTS $rpmbuild_opts --nodeps \
$SRPM_SPECFILE_WITH_PATH 2>&1" $SRPM_SPECFILE_WITH_PATH 2>&1"
fi fi
local rpmbuild_retcode="$?" local rpmbuild_retcode="$?"
@ -2199,7 +2169,7 @@ It seems good but do not forget to run quality and security tests"\
" (-a8)${NORM}"" " (-a8)${NORM}""
" "
else else
local tmpunpackfiles=$(mktemp -q -p /var/tmp -t $me.XXXXXXXX) local tmpunpackfiles=$(mktemp -q -t $me.XXXXXXXX)
[ $? -eq 0 ] || notify.error $"can't create temporary files" [ $? -eq 0 ] || notify.error $"can't create temporary files"
notify.debug "tmpunpackfiles = \`${NOTE}$tmpunpackfiles${NORM}'" notify.debug "tmpunpackfiles = \`${NOTE}$tmpunpackfiles${NORM}'"
@ -2221,8 +2191,8 @@ format_unpackaged_file_list_arch = $format_unpackaged_file_list_arch"
[ "$skipline" = 1 ] || echo "$line" [ "$skipline" = 1 ] || echo "$line"
done < <(LC_ALL=C eval rpmbuild -bl $rpmbuild_opts --nodeps --nobuild \ done < <(LC_ALL=C eval rpmbuild -bl $rpmbuild_opts --nodeps --nobuild \
$SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1) | \ $SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1) | \
sed -e "$format_unpackaged_file_list_common;\ sed -e "${!format_unpackaged_file_list_arch};\
${!format_unpackaged_file_list_arch}" > $tmpunpackfiles $format_unpackaged_file_list_common" > $tmpunpackfiles
if [ -s "$tmpunpackfiles" ]; then if [ -s "$tmpunpackfiles" ]; then
notify.error $"\ notify.error $"\
@ -2279,7 +2249,7 @@ build the list of the build requirements""${NORM}"
notify.debug "SPEC_TARGET = [ ${SPEC_TARGET[*]} ]" notify.debug "SPEC_TARGET = [ ${SPEC_TARGET[*]} ]"
notify.debug "pcks_list = [ ${pcks_list[*]} ]" notify.debug "pcks_list = [ ${pcks_list[*]} ]"
local frequires=$(mktemp -q -p /var/tmp -t frequires.XXXXXXXX) || local frequires=$(mktemp -q -t frequires.XXXXXXXX) ||
notify.error $"can't create temporary files" notify.error $"can't create temporary files"
# FIXME: "/usr/lib/perl5" should be defined in autospec.conf # FIXME: "/usr/lib/perl5" should be defined in autospec.conf
local perl_prefixes=$(perl -V | grep "^[[:space:]]\+/usr/lib/perl5") local perl_prefixes=$(perl -V | grep "^[[:space:]]\+/usr/lib/perl5")
@ -2310,12 +2280,8 @@ build the list of the build requirements""${NORM}"
elif [ "${req:0:1}" = "/" ]; then elif [ "${req:0:1}" = "/" ]; then
# file requirement; ignore # file requirement; ignore
: :
elif [ "${req:0:1}" = "(" ]; then
# rich requirement; add as it is
buildreq="$line"
elif [ "${req:0:7}" = "rpmlib(" -o \ elif [ "${req:0:7}" = "rpmlib(" -o \
"${req:0:7}" = "config(" -o \ "${req:0:7}" = "config(" -o \
"${req:0:5}" = "rtld(" -o \
"${req:0:11}" = "executable(" ]; then "${req:0:11}" = "executable(" ]; then
# not a build requirement # not a build requirement
: :
@ -2329,27 +2295,18 @@ build the list of the build requirements""${NORM}"
sed "s|\(.*\)-[^-]*-[^-]*|\1|") sed "s|\(.*\)-[^-]*-[^-]*|\1|")
[ "$buildreq" ] && break [ "$buildreq" ] && break
done done
[ "$buildreq" ] || buildreq="$req" [ "$buildreq" ] ||
echo "# $req: perl requirement not resolved"
elif [ "${req}" = "python(abi)" ]; then elif [ "${req}" = "python(abi)" ]; then
# FIXME: libpython-devel should be defined in autospec.conf # FIXME: libpython-devel should be defined in autospec.conf
# python requirement # python requirement
reqver=${line/*= /} buildreq="libpython-devel"
buildreq="libpython${reqver/\.}-devel"
rpm -q --qf %{name} --whatprovides "$buildreq" &>/dev/null || {
buildreq="libpython${reqver/\.*}-devel"
}
elif [[ "$req" =~ .*\.so\.[0-9]* ]]; then elif [[ "$req" =~ .*\.so\.[0-9]* ]]; then
solibpath_catch="" solibpath_catch=""
# is a shared library # is a shared library
# req="libGL.so.1(libc6)" => /usr/lib/libGL.so # req="libGL.so.1(libc6)" => /usr/lib/libGL.so
reqpaths=$($path_ldconfig -Np | \ reqpath=$($path_ldconfig -Np | \
sed -n "s, ,,g;/${req/(*)/}/{s,.*=>,,;p}") sed -n "s, ,,g;/${req/(*)/}/{s,.*=>,,;p}")
reqpath=""
for l in $reqpath; do
[ "${reqpath}" = "" ] && reqpath=$l
# Prefer solib in libdir path in case of multiple choices
[ "`dirname $l`" = "${libdir}" ] && { reqpath=$l; break; }
done
solibpath="${reqpath/\.so\.*/.so}" solibpath="${reqpath/\.so\.*/.so}"
notify.debug "\ notify.debug "\
req=\"$req\" ($reqpath) =?> solibpath=\"$solibpath\"" req=\"$req\" ($reqpath) =?> solibpath=\"$solibpath\""
@ -2386,25 +2343,12 @@ $(echo $solibpath | sed "s|-[0-9.]*\.so|.so|")"
echo "\ echo "\
#$req: $solibpath_catch: file not owned by any package" #$req: $solibpath_catch: file not owned by any package"
else else
if [ "${req:0:8}" != "ld-linux" -a "${req:0:13}" != "libpthread.so" ]; then echo "#$req: .so link not found"
echo "#$req: .so link not found"
fi
fi fi
else else
# Find installed package providing library using rpm echo "\
buildreq= #$req: library not reported by ldconfig; run \`ldconfig' and try again"
rpm -q --qf %{name} --whatprovides "$req" &>/dev/null &&
buildreq="$(rpm -q --qf "%{name}\n" --whatprovides "$req"|head -n1)" ||
echo "#$req: library not reported by ldconfig and not provided in any installed package"
# Find providing package -devel if present
if [ "${buildreq}" != "" ]; then
rpm -q --qf %{name} "${buildreq}-devel" &>/dev/null &&
buildreq="${buildreq}-devel"
fi
fi fi
elif [[ "$req" =~ .*python.*dist\(.*\).* ]]; then
# Python dist requirement
buildreq="$req"
elif [[ "$req" =~ .*\(.*\) || "$req" =~ .*\.so ]]; then elif [[ "$req" =~ .*\(.*\) || "$req" =~ .*\.so ]]; then
# a(b) requirement or *.so library # a(b) requirement or *.so library
rpm -q --qf %{name} --whatprovides "$req" &>/dev/null && rpm -q --qf %{name} --whatprovides "$req" &>/dev/null &&
@ -2430,29 +2374,20 @@ $(echo $solibpath | sed "s|-[0-9.]*\.so|.so|")"
fi fi
done ) | sort -u >> $frequires done ) | sort -u >> $frequires
[ "$replace_autobuildreq" = 1 ] &&
notify.note "
${NOTE}"$"replacing the AUTOBUILDREQ block by:""${NORM}"
notify.note " notify.note "
## AUTOBUILDREQ-BEGIN" ## AUTOBUILDREQ-BEGIN"
cat $frequires cat $frequires
notify.note "## AUTOBUILDREQ-END" notify.note "## AUTOBUILDREQ-END
"
if [ "$replace_autobuildreq" = 1 ]; then if [ "$replace_autobuildreq" = 1 ]; then
sed -n '/^## AUTOBUILDREQ-BEGIN/,/^## AUTOBUILDREQ-END/p' \ sed -i "/^## AUTOBUILDREQ/d" $frequires
$SRPM_SPECFILE_WITH_PATH | grep -q "%if" && skip_replace_autobuildreq=1 sed -i -ne "/## AUTOBUILDREQ-BEGIN/{p;r $frequires" \
-e ':a;n;/## AUTOBUILDREQ-END/{p;b};ba};p' \
if [ "$skip_replace_autobuildreq" ]; then $SRPM_SPECFILE_WITH_PATH
notify.note "${NOTE}"$"
skipping replacing the AUTOBUILDREQ block because it contains a conditional macro""${NORM}"
else
notify.note "${NOTE}"$"
Replacing the AUTOBUILDREQ block and recreating the SRPM""${NORM}"
sed -i "/^## AUTOBUILDREQ/d" $frequires
sed -i -ne "/## AUTOBUILDREQ-BEGIN/{p;r $frequires" \
-e ':a;n;/## AUTOBUILDREQ-END/{p;b};ba};p' \
$SRPM_SPECFILE_WITH_PATH
eval "\
rpmbuild -bs $USER_RPMDEFINE_OPTS $rpmbuild_opts \
$SRPM_SPECFILE_WITH_PATH 2>&1"
fi
fi fi
rm -f $frequires rm -f $frequires
@ -2527,7 +2462,7 @@ pck_newver = \"$pck_newver\", pck_newrel = \"$pck_newrel\""
notify.debug "pck_rpmrelease = $pck_rpmrelease" notify.debug "pck_rpmrelease = $pck_rpmrelease"
local tmpextractdir local tmpextractdir
tmpextractdir=$(mktemp -q -d -p /var/tmp -t rpm_extract.XXXXXXXX) tmpextractdir=$(mktemp -q -d -t rpm_extract.XXXXXXXX)
[[ $? -eq 0 ]] || [[ $? -eq 0 ]] ||
notify.error $"can't create temporary files" notify.error $"can't create temporary files"
notify.debug "$FUNCNAME: tmpextractdir = $tmpextractdir" notify.debug "$FUNCNAME: tmpextractdir = $tmpextractdir"
@ -2661,7 +2596,7 @@ calculate the md5/sha1 hashing values""${NORM}"
--urlnum "$ftp_server_upload_num" \ --urlnum "$ftp_server_upload_num" \
--proxy "$proxy" \ --proxy "$proxy" \
--proxy-user "$proxy_user" \ --proxy-user "$proxy_user" \
"$pck_name" "$pck_name" ${SPEC_OBSOLETES[@]}
# FIXME: `$?' is nonzero if the argument of `--urllist' is ""; # FIXME: `$?' is nonzero if the argument of `--urllist' is "";
# this generally happens with a buggy configuration file but we # this generally happens with a buggy configuration file but we
# do not stop the execution here with an errors condition # do not stop the execution here with an errors condition
@ -2727,7 +2662,13 @@ ftp_server_upload_num = \"$ftp_server_upload_num\" (was unset)"
notify.debug "\ notify.debug "\
ftp_server_upload_num = \"$ftp_server_upload_num\"" ftp_server_upload_num = \"$ftp_server_upload_num\""
if [ ! "${ftp_rw_server[$ftp_server_upload_num]}" ]; then if [ "${ftp_rw_server[$ftp_server_upload_num]}" ]; then
repository.is_reachable "${ftp_rw_server[$ftp_server_upload_num]}"
# NOTE. notify.error --> notify.warning because host command fails
# in qemu-arm environment (1.4.18)
[ $? -eq 0 ] || notify.warning $"\
server unreachable"": \`${ftp_rw_server[$ftp_server_upload_num]}'"
else
notify.error $"\ notify.error $"\
you have no read write access to url#$ftp_server_upload_num" you have no read write access to url#$ftp_server_upload_num"
break break

View File

@ -44,9 +44,9 @@ spec_cmd_configure_autogen="./autogen.sh\n%configure"
spec_cmd_make_autogen="%make" spec_cmd_make_autogen="%make"
spec_cmd_makeinstall_autogen="%makeinstall" spec_cmd_makeinstall_autogen="%makeinstall"
spec_cmd_configure_cmake="%cmake" spec_cmd_configure_cmake="%cmake -d build"
spec_cmd_make_cmake="%cmake_build" spec_cmd_make_cmake="%make"
spec_cmd_makeinstall_cmake="%cmake_install" spec_cmd_makeinstall_cmake="%makeinstall -C build"
spec_cmd_configure_scons="" spec_cmd_configure_scons=""
spec_cmd_make_scons="scons" spec_cmd_make_scons="scons"
@ -60,10 +60,6 @@ spec_cmd_configure_default=""
spec_cmd_make_default="" spec_cmd_make_default=""
spec_cmd_makeinstall_default="" spec_cmd_makeinstall_default=""
spec_cmd_configure_meson="%meson"
spec_cmd_make_meson="%meson_build"
spec_cmd_makeinstall_meson="%meson_install"
[ "$perl_Makefile_generator" ] || perl_Makefile_generator="Makefile.PL" [ "$perl_Makefile_generator" ] || perl_Makefile_generator="Makefile.PL"
preserve_dot_git=0 preserve_dot_git=0
@ -113,6 +109,8 @@ function usage() {
standard : "$"standard specfile (default)"" standard : "$"standard specfile (default)""
ghc : "$"specfile for ghc packages"" ghc : "$"specfile for ghc packages""
gnome : "$"specfile for gnome packages"" gnome : "$"specfile for gnome packages""
kde3 : "$"specfile for kde3 packages""
kde4 : "$"specfile for kde4 packages""
kde5 : "$"specfile for kde5 packages"" kde5 : "$"specfile for kde5 packages""
library : "$"specfile for common library packages"" library : "$"specfile for common library packages""
ocaml-libs : "$"specfile for OCaml library packages"" ocaml-libs : "$"specfile for OCaml library packages""
@ -126,7 +124,7 @@ function usage() {
"$"Override packager full name"" "$"Override packager full name""
--packager-email --packager-email
"$"Override packager email"" "$"Override packager email""
--git-branch "$"Specify a git branch or tag and (optionally) a commit by appending @commit_id"" --git-branch "$"Specify a git branch""
--preserve-dot-git "$"Do not remove git files"" --preserve-dot-git "$"Do not remove git files""
--colors "$"Select the theme to be used for the colorized output"" --colors "$"Select the theme to be used for the colorized output""
-C, --config "$"Use an alternate user configuration file"" <conf_file>"" -C, --config "$"Use an alternate user configuration file"" <conf_file>""
@ -141,7 +139,7 @@ function usage() {
"$"Samples"": "$"Samples"":
@frontend@ -s ~/software/@package@-@version@.tar.bz2 -t standard -o @package@.spec @frontend@ -s ~/software/@package@-@version@.tar.bz2 -t standard -o @package@.spec
@frontend@ -s http://ftp.openmamba.org/devel/tools/@package@/@package@-@version@.tar.bz2 @frontend@ -s http://ftp.qilinux.it/devel/tools/@package@/@package@-@version@.tar.bz2
@frontend@ -s @package@-@version@.tar.bz2 --changelog \"First build\" @frontend@ -s @package@-@version@.tar.bz2 --changelog \"First build\"
@frontend@ -s git://anongit.freedesktop.org/gstreamer/gst-omx \\ @frontend@ -s git://anongit.freedesktop.org/gstreamer/gst-omx \\
--git-branch=\"raspberry\" --preserve-dot-git -o gst-omx.spec --git-branch=\"raspberry\" --preserve-dot-git -o gst-omx.spec
@ -415,12 +413,6 @@ shared-libraries:,debug-package:,\
spec_cmd_makeinstall="$spec_cmd_makeinstall_scons" spec_cmd_makeinstall="$spec_cmd_makeinstall_scons"
buildrequires_buildtool="scons" buildrequires_buildtool="scons"
;; ;;
meson)
spec_cmd_configure="$spec_cmd_configure_meson"
spec_cmd_make="$spec_cmd_make_meson"
spec_cmd_makeinstall="$spec_cmd_makeinstall_meson"
buildrequires_buildtool="meson"
;;
unknown) unknown)
notify.warning $"unknown build techonology" notify.warning $"unknown build techonology"
spec_cmd_configure="$spec_cmd_configure_default" spec_cmd_configure="$spec_cmd_configure_default"
@ -654,7 +646,7 @@ python modules must have this name structure (use \`-n'):"" \
# link fd#3 with stdout and redirect stdout to the log file # link fd#3 with stdout and redirect stdout to the log file
[ "$outfile" ] && { exec 3<&1; exec 1>>$outfile; } [ "$outfile" ] && { exec 3<&1; exec 1>>$outfile; }
local tmpdir=`mktemp -q -d -p /var/tmp -t $me.XXXXXXXX` local tmpdir=`mktemp -q -d -t $me.XXXXXXXX`
[ $? -eq 0 ] || [ $? -eq 0 ] ||
notify.error $"can't create temporary directory" notify.error $"can't create temporary directory"
@ -838,9 +830,6 @@ echo "$line" | sed "s|.*=[\ \t]*\"\(.*\)\"|\1|") ..." # vim highlight need a "
MANUAL MANUAL
THANKS' THANKS'
local standard_docs_dirlist='
LICENSES'
local standard_docs_devel_list=' local standard_docs_devel_list='
BACKLOG BACKLOG
BUGS BUGS
@ -860,14 +849,6 @@ echo "$line" | sed "s|.*=[\ \t]*\"\(.*\)\"|\1|") ..." # vim highlight need a "
# ignore empty documentation files # ignore empty documentation files
[ -s $tmpdir/$pck_rootdir/$currdoc ] && [ -s $tmpdir/$pck_rootdir/$currdoc ] &&
standard_docs="\ standard_docs="\
${standard_docs:+$standard_docs }$currdoc"
done
done
for doc in $standard_docs_dirlist; do
currdocs=$(cd $tmpdir/$pck_rootdir && ls -d $doc 2>/dev/null)
for currdoc in $currdocs; do
[ -d $tmpdir/$pck_rootdir/$currdoc ] &&
standard_docs="\
${standard_docs:+$standard_docs }$currdoc" ${standard_docs:+$standard_docs }$currdoc"
done done
done done
@ -887,12 +868,10 @@ ${standard_docs_devel:+$standard_docs_devel }$currdoc"
local build_techology="unknown" local build_techology="unknown"
case "$spec_type" in case "$spec_type" in
perl|python) kde3|kde4|perl|python)
build_techology="$spec_type" build_techology="$spec_type"
;; ;;
*) if [ -e $tmpdir/$pck_rootdir/meson.build ]; then *) if [ -e $tmpdir/$pck_rootdir/CMakeLists.txt ]; then
build_techology="meson"
elif [ -e $tmpdir/$pck_rootdir/CMakeLists.txt ]; then
build_techology="cmake" build_techology="cmake"
elif [ -x $tmpdir/$pck_rootdir/configure ]; then elif [ -x $tmpdir/$pck_rootdir/configure ]; then
build_techology="autotools" build_techology="autotools"
@ -959,6 +938,7 @@ $spec_cmd_configure_autotools --enable-gtk-doc"
# 12. debug package # 12. debug package
local debug_package="0" local debug_package="0"
[ -n "$rpm_macro_debug_package" ] && debug_package="1"
# FIXME: missing support for: # FIXME: missing support for:
# pkgconfig files # pkgconfig files

View File

@ -65,8 +65,8 @@ locales: merge-pot-files
$(srcdir)/po/$(pck_catalog_tmpl) && \ $(srcdir)/po/$(pck_catalog_tmpl) && \
echo "[DONE]" || { echo "[FAILED]"; exit 1; } echo "[DONE]" || { echo "[FAILED]"; exit 1; }
@echo -n "Checking $(pck_catalog) for untranslated strings... " @echo -n "Checking $(pck_catalog) for untranslated strings... "
@/bin/grep -q 'msgstr[ \t]*""' $(pck_catalog) && \ @/bin/grep -q 'msgstr[ \t]*\"\"' $(pck_catalog) && \
{ echo "[UNTRANSLATED STRING]"; exit 1; } || \ { echo "[UNTRASLATED STRING]"; exit 1; } || \
echo "[NONE]" echo "[NONE]"
install: $(pck_catalog:.po=.mo) install: $(pck_catalog:.po=.mo)

View File

@ -3,6 +3,19 @@
# This file is distributed under the same license as the autospec package. # This file is distributed under the same license as the autospec package.
# Davide Madrisan <davide.madrisan@gmail.com>, 2004-2013. # Davide Madrisan <davide.madrisan@gmail.com>, 2004-2013.
# #
msgid ""
msgstr "Project-Id-Version: autospec 1.16.4\n"
"Report-Msgid-Bugs-To: davide.madrisan@gmail.com\n"
"POT-Creation-Date: 2013-07-13 19:30+0100\n"
"PO-Revision-Date: 2013-07-13 19:30+0100\n"
"Last-Translator: Davide Madrisan <davide.madrisan@gmail.com>\n"
"Language-Team: \n"
"Language: Italian \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "this script requires bash version 2 or better" msgid "this script requires bash version 2 or better"
msgstr "questo script richiede bash versione 2 o superiore" msgstr "questo script richiede bash versione 2 o superiore"
@ -190,8 +203,8 @@ msgid "a new version of \\`${NOTE}$specname${NORM}' is available!"
msgstr "è disponibile una nuova versione di \\`${NOTE}$specname${NORM}'!" msgstr "è disponibile una nuova versione di \\`${NOTE}$specname${NORM}'!"
msgid "a newer version of \\`${NOTE}$specname${NORM}' is already installed" msgid "a newer version of \\`${NOTE}$specname${NORM}' is already installed"
msgstr "è già installata una versione successiva di " msgstr "è già installata una versione successiva di \\`${NOTE}$specname"
"\\`${NOTE}$specname${NORM}'" "${NORM}'"
msgid "cannot find a new version of \\`$specname'" msgid "cannot find a new version of \\`$specname'"
msgstr "impossibile trovare una nuova versione per \\`$specname'" msgstr "impossibile trovare una nuova versione per \\`$specname'"
@ -224,12 +237,12 @@ msgstr "tema di colori sconosciuto \\`$color_scheme': output con colori "
msgid "utility not found" msgid "utility not found"
msgstr "programma non trovato" msgstr "programma non trovato"
msgid "usage error (--ftp/--html)"
msgstr "errato utilizzo (--ftp/--html)"
msgid "missing mandatory arg" msgid "missing mandatory arg"
msgstr "parametro mancante" msgstr "parametro mancante"
msgid "usage error (--ftp/--html)"
msgstr "errato utilizzo (--ftp/--html)"
msgid "'\\\\' characters detected in \\$pck_name" msgid "'\\\\' characters detected in \\$pck_name"
msgstr "trovato carattere '\\\\' in \\$pck_name" msgstr "trovato carattere '\\\\' in \\$pck_name"
@ -275,15 +288,15 @@ msgstr "pacchetto non trovato"
msgid "unknown action" msgid "unknown action"
msgstr "azione sconosciuta" msgstr "azione sconosciuta"
msgid "not the expected package version"
msgstr "non è la versione di pacchetto prevista"
msgid "cloning git repository" msgid "cloning git repository"
msgstr "clonazione del repository" msgstr "clonazione del repository"
msgid "cannot clone git repository" msgid "cannot clone git repository"
msgstr "impossibile clonare il repository git" msgstr "impossibile clonare il repository git"
msgid "cannot checkout the specified tag"
msgstr "impossibile fare il checkout del tag specificato"
msgid "creating the compressed source tarball" msgid "creating the compressed source tarball"
msgstr "creazione del file sorgente compresso" msgstr "creazione del file sorgente compresso"
@ -504,10 +517,6 @@ msgstr "Sostituisce il nome completo del packager"
msgid "Override packager email" msgid "Override packager email"
msgstr "Ridefinisce l'indirizzo mail del packager" msgstr "Ridefinisce l'indirizzo mail del packager"
msgid "Override release append tag (predefined: $DISTRO_rpm)"
msgstr "Ridefinisce l'etichetta aggiunta alla release (predefinito: "
"$DISTRO_rpm)"
msgid "action" msgid "action"
msgstr "azione" msgstr "azione"
@ -529,11 +538,6 @@ msgstr "Cerca i file non pacchettizzati"
msgid "Replace the block AUTOBUILDREQ" msgid "Replace the block AUTOBUILDREQ"
msgstr "Aggiorna il blocco AUTOBUILDREQ" msgstr "Aggiorna il blocco AUTOBUILDREQ"
msgid "Skip rpmbuild %prep macro when retrying building from an existing "
"builddir"
msgstr "Salta la macro %prep di rpmbuild per riprovare la compilazione da "
"una builddir esistente"
msgid "Remove all the temporary files except (s)rpm packages" msgid "Remove all the temporary files except (s)rpm packages"
msgstr "Rimuove tutti i file temporanei" msgstr "Rimuove tutti i file temporanei"
@ -579,8 +583,8 @@ msgstr "specfile in formato non supportato"
msgid "release number: unsupported format" msgid "release number: unsupported format"
msgstr "numero di release: formato non supportato" msgstr "numero di release: formato non supportato"
msgid "new release \\`$pck_newrel' must be greater than current one " msgid "new release \\`$pck_newrel' must be greater than current one \\`"
"\\`$SPEC_RELEASE'" "$SPEC_RELEASE'"
msgstr "la nuova release \\`$pck_newrel' deve essere maggiore di quella " msgstr "la nuova release \\`$pck_newrel' deve essere maggiore di quella "
"corrente \\`$SPEC_RELEASE'" "corrente \\`$SPEC_RELEASE'"
@ -717,8 +721,8 @@ msgid "cannot install the needed build requirements"
msgstr "impossibile installare i \"build requirement\" necessari" msgstr "impossibile installare i \"build requirement\" necessari"
msgid "found ${NOTE}missing BuildRequirement${NORM} \\`${NOTE}$f${NORM}'" msgid "found ${NOTE}missing BuildRequirement${NORM} \\`${NOTE}$f${NORM}'"
msgstr "trovato ${NOTE}BuildRequirement non soddisfatto${NORM} " msgstr "trovato ${NOTE}BuildRequirement non soddisfatto${NORM} \\`${NOTE}$f"
"\\`${NOTE}$f${NORM}'" "${NORM}'"
msgid "testing out specfile" msgid "testing out specfile"
msgstr "esecuzione dei test sullo specfile" msgstr "esecuzione dei test sullo specfile"
@ -737,8 +741,7 @@ msgstr "Sembra ok ma non dimenticare di eseguire i test di qualità e "
"sicurezza" "sicurezza"
msgid "no arch-specific pattern translations for unpackaged files" msgid "no arch-specific pattern translations for unpackaged files"
msgstr "nessuna corrispondenza di pattern legati all'architettura per i file " msgstr "nessuna corrispondenza di pattern legati all'architettura per i file non pacchetizzati"
"non pacchetizzati"
msgid "Add the following files in the right %files blocks" msgid "Add the following files in the right %files blocks"
msgstr "Smistare i seguenti file nelle sezioni %files corrispondenti" msgstr "Smistare i seguenti file nelle sezioni %files corrispondenti"
@ -749,17 +752,8 @@ msgstr "release del nuovo pacchetto non indicata"
msgid "ignoring requirement" msgid "ignoring requirement"
msgstr "requirement ignorato" msgstr "requirement ignorato"
msgid "\n" msgid "replacing the AUTOBUILDREQ block by:"
"skipping replacing the AUTOBUILDREQ block because it contains a " msgstr "sostituzione del blocco AUTOBUILDREQ con:"
"conditional macro"
msgstr "\n"
"blocco AUTOBUILDREQ non sostituito perché contiene una macro "
"condizionale"
msgid "\n"
"Replacing the AUTOBUILDREQ block and recreating the SRPM"
msgstr "\n"
"Sostituzione del blocco AUTOBUILDREQ e ricreazione del pacchetto SRPM"
msgid "rpm exited with error code:" msgid "rpm exited with error code:"
msgstr "rpm è terminato con il codice di errore:" msgstr "rpm è terminato con il codice di errore:"
@ -770,6 +764,9 @@ msgstr "controllo dello specfile alla ricerca di comuni errori"
msgid "checking packages for common mistakes" msgid "checking packages for common mistakes"
msgstr "controllo dei pacchetti alla ricerca di comuni errori" msgstr "controllo dei pacchetti alla ricerca di comuni errori"
msgid "server unreachable"
msgstr "server non raggiungibile"
msgid "you have no read write access to url#$ftp_server_upload_num" msgid "you have no read write access to url#$ftp_server_upload_num"
msgstr "accesso in scrittura alla url#$ftp_server_upload_num vietato" msgstr "accesso in scrittura alla url#$ftp_server_upload_num vietato"
@ -835,6 +832,12 @@ msgstr "specfile per pacchetti ghc"
msgid "specfile for gnome packages" msgid "specfile for gnome packages"
msgstr "specfile per pacchetti gnome" msgstr "specfile per pacchetti gnome"
msgid "specfile for kde3 packages"
msgstr "specfile per pacchetti kde3"
msgid "specfile for kde4 packages"
msgstr "specfile per pacchetti kde4"
msgid "specfile for kde5 packages" msgid "specfile for kde5 packages"
msgstr "specfile per pacchetti kde5" msgstr "specfile per pacchetti kde5"
@ -859,10 +862,8 @@ msgstr "specfile per applicazioni web"
msgid "Redirect the output to the file <outfile>" msgid "Redirect the output to the file <outfile>"
msgstr "Redirige lo standard output sul file <outfile>" msgstr "Redirige lo standard output sul file <outfile>"
msgid "Specify a git branch or tag and (optionally) a commit by appending " msgid "Specify a git branch"
"@commit_id" msgstr "Specifica un branch git"
msgstr "Specifica un branch o un tag git e (opzionalmente) un commit "
"aggiungendo @commit_id"
msgid "Do not remove git files" msgid "Do not remove git files"
msgstr "Non rimuove i file git" msgstr "Non rimuove i file git"
@ -894,6 +895,9 @@ msgstr "impossibile trovare il pacchetto $pck_tarball"
msgid "cannot get the package name, use the \\`-n' option" msgid "cannot get the package name, use the \\`-n' option"
msgstr "impossibile ricavare il nome del pacchetto, usa l'opzione \\`-n'" msgstr "impossibile ricavare il nome del pacchetto, usa l'opzione \\`-n'"
msgid "invalid version number"
msgstr "numero di versione non valido"
msgid "cannot get the package version, use the \\`-v' option" msgid "cannot get the package version, use the \\`-v' option"
msgstr "impossibile ricavare la versione del pacchetto, usa l'opzione \\`-v'" msgstr "impossibile ricavare la versione del pacchetto, usa l'opzione \\`-v'"
@ -937,17 +941,6 @@ msgstr "sembra un modulo python (in questo caso usa \\`-t python')"
msgid "created specfile" msgid "created specfile"
msgstr "creato specfile" msgstr "creato specfile"
msgid "checking Source URL with: "
msgstr "controllo della URL sorgente con: "
msgid "redirect detected: replacing from \\`$SPEC_URL' to "
"\\`${http_effective_url}'"
msgstr "redirezione rilevata: sostituzione da \\`$SPEC_URL' a "
"\\`${http_effective_url}'"
msgid "invalid return code for \\`$SPEC_URL': $http_code"
msgstr "codice restituito non valido per \\`$SPEC_URL': $http_code"
msgid "does not point to a valid internet address" msgid "does not point to a valid internet address"
msgstr "non fa riferimento ad un indirizzo internet" msgstr "non fa riferimento ad un indirizzo internet"
@ -966,17 +959,6 @@ msgstr "manca almeno una direttiva \\`%defattr'"
msgid "use rpm macros if possible:" msgid "use rpm macros if possible:"
msgstr "utilizzare le macro rpm quando possibile:" msgstr "utilizzare le macro rpm quando possibile:"
msgid ""
msgstr "Project-Id-Version: autospec 1.16.4\n"
"Report-Msgid-Bugs-To: davide.madrisan@gmail.com\n"
"POT-Creation-Date: 2013-07-13 19:30+0100\n"
"PO-Revision-Date: 2013-07-13 19:30+0100\n"
"Last-Translator: Davide Madrisan <davide.madrisan@gmail.com>\n"
"Language-Team: \n"
"Language: Italian \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "localization files must be packaged via \\`%find_lang'" msgid "localization files must be packaged via \\`%find_lang'"
msgstr "trovati file di localizzazione non gestiti da \\`%find_lang'" msgstr "trovati file di localizzazione non gestiti da \\`%find_lang'"
@ -1104,6 +1086,3 @@ msgid "${NOTE}Security checks: ${#rpmpkg_name[@]} package(s) checked: "
"${NORM}${WARN}$total_issues${NORM}${NOTE} warning(s).${NORM}" "${NORM}${WARN}$total_issues${NORM}${NOTE} warning(s).${NORM}"
msgstr "${NOTE}Controlli di sicurezza: pacchetti rpm: ${#rpmpkg_name[@]}; " msgstr "${NOTE}Controlli di sicurezza: pacchetti rpm: ${#rpmpkg_name[@]}; "
"problemi riscontrati: ${NORM}${WARN}$total_issues${NORM}" "problemi riscontrati: ${NORM}${WARN}$total_issues${NORM}"
#~ msgid "not the expected package version"
#~ msgstr "non è la versione di pacchetto prevista"

View File

@ -18,7 +18,7 @@ srcdir = ..
include $(srcdir)/Makefile.env include $(srcdir)/Makefile.env
pck_templates := ghc gnome kde5 kf6 library ocaml-libs perl perl-build python python-setuptools standard standard-daemon web pck_templates := ghc gnome kde3 kde4 kde5 library ocaml-libs perl python standard standard-daemon web
all: all:

View File

@ -1,5 +1,5 @@
%define ghc_ver %(ghc --numeric-version) %define ghc_ver %(ghc --numeric-version)
%define pkg_name %(echo %name | sed "s|^ghc-||") %define pkgname %(echo %name | sed "s|^ghc-||")
Name: @pck_name@ Name: @pck_name@
Version: @pck_version@ Version: @pck_version@
@ -9,8 +9,8 @@ Group: Development/Libraries
Vendor: @VENDOR@ Vendor: @VENDOR@
Distribution: @DISTRO@ Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@> Packager: @packager_fullname@ <@packager_email@>
URL: https://hackage.haskell.org/package/%{pkg_name} URL: http://hackage.haskell.org/package/%{pkgname}
Source: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz Source: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
License: BSD License: BSD
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
@ -22,60 +22,60 @@ Requires(post): %{__install_info}
Requires(preun): %{__install_info} Requires(preun): %{__install_info}
@fi:infopages @fi:infopages
BuildRequires: ghc BuildRequires: ghc
BuildRequires: ghc-rpm-macros BuildRequires: hscolour
Requires: ghc = %{ghc_ver} Requires: ghc = %{ghc_ver}
BuildRoot: @rpm_default_buildroot@
%description %description
%{summary}. ...
%package devel ## Remove the following block if there is no binary tool provided
Summary: Haskell %{pkg_name} library development files #%package -n %{pkgname}
Provides: %{name}-static = %{?epoch:%epoch:}%{version}-%{release} #Group: Applications/Development
Provides: %{name}-static%{?_isa} = %{?epoch:%epoch:}%{version}-%{release} #Summary: ...
%if %{defined ghc_version} #
Requires: ghc = %{ghc_version} #%description -n %{pkgname}
%endif #...
Requires: %{name}%{?_isa} = %{?epoch:%epoch:}%{version}-%{release}
%description devel
This package provides the Haskell %{pkg_name} library development files.
%if %{with haddock}
%package doc
Summary: Haskell %{pkg_name} library documentation
Requires: ghc-filesystem
%description doc
This package provides the Haskell %{pkg_name} library documentation.
%endif
%prep %prep
%setup -q -n %{pkgname}-%{version} %setup -q -n %{pkgname}-%{version}
%build %build
%ghc_lib_build runghc Setup.hs configure -v2 \\
\ --prefix=%{_prefix} \\
\ --libdir=%{_libdir} \\
\ --libexecdir=%{_libexecdir} \\
\ --docdir=%{_docdir}/%{name}-%{version}
runghc Setup.hs build
runghc Setup.hs haddock --executable --html-location=URL --hyperlink-source
%install %install
%ghc_lib_install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
runghc Setup.hs copy --destdir=%{buildroot}
rm -f %{buildroot}%{_ghclicensedir}/%{name}/LICENSE runghc Setup.hs register \\
\ --gen-pkg-config="%{buildroot}%{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version}/%{pkgname}-%{version}.conf"
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files -f %{name}.files %post
%defattr(-,root,root) ghc-pkg register %{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version}/%{pkgname}-%{version}.conf &>/dev/null || :
%license LICENSE
%files devel -f %{name}-devel.files %preun
%defattr(-,root,root) ghc-pkg unregister %{pkgname}-%{version} &>/dev/null || :
#%doc CHANGELOG.markdown README.markdown
%if %{with haddock} %files
%files doc -f %{name}-doc.files
%defattr(-,root,root) %defattr(-,root,root)
%license LICENSE %{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version}
%endif %dir %{_docdir}/%{name}-%{version}
%{_docdir}/%{name}-%{version}/LICENSE
%{_docdir}/%{name}-%{version}/html
## Remove the following block if there is no binary tool provided
#%files -n %{pkgname}
#%defattr(-,root,root)
#%{_bindir}/%{pkgname}
%changelog %changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@ * @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@

View File

@ -12,13 +12,15 @@ Group: ...
Vendor: @VENDOR@ Vendor: @VENDOR@
Distribution: @DISTRO@ Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@> Packager: @packager_fullname@ <@packager_email@>
URL: https://www.gnome.org URL: http://www.gnome.org
Source: https://download.gnome.org/pub/GNOME/%{gnomegroup}/%{gnomemajver}/%{gnomever}/sources/%{pkgname}-%{version}.tar.bz2 # bugfixes: http://ftp.acc.umu.se/pub/GNOME/sources/%{pkgname}-*.tar.bz2
Source: http://ftp.gnome.org/pub/GNOME/%{gnomegroup}/%{gnomemajver}/%{gnomever}/sources/%{pkgname}-%{version}.tar.bz2
License: GPL License: GPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements. ## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRequires: gtk-doc BuildRequires: gtk-doc
BuildRoot: @rpm_default_buildroot@
%description %description
... ...

46
templates/kde3 Normal file
View File

@ -0,0 +1,46 @@
Name: @pck_name@
Version: @pck_version@
Release: @spec_first_release@@DISTRO_rpm@
Summary: ...
Group: ...
Vendor: @VENDOR@
Distribution: @DISTRO@
Packager: $packager_fullname <$packager_email>
URL: ...
Source: ...
License: ...
## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
## AUTOBUILDREQ-END
BuildRoot: @rpm_default_buildroot@
%description
...
@if:debug_package
%debug_package
@fi:debug_package
%prep
%setup -q
%build
%configure_kde
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
@standard_docs@
## note: eventually add the remaining documents (if any)
# @standard_docs_devel@
%changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@
- @spec_changelog_comment@

141
templates/kde4 Normal file
View File

@ -0,0 +1,141 @@
Name: @pck_name@
Version: @pck_version@
Release: @spec_first_release@@DISTRO_rpm@
Summary: ...
Group: ...
Vendor: @VENDOR@
Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@>
URL: http://www.kde.org
Source: ...
License: ...
BuildRequires: automoc4
BuildRequires: cmake
BuildRequires: libqt4-devel
BuildRequires: kdelibs-devel
## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
## AUTOBUILDREQ-END
Requires: kdelibs%{?_kde4_version: >= %{_kde4_version}}
BuildRoot: @rpm_default_buildroot@
%description
...
## remove the devel blocks if this package does not provide development stuff
%package devel
Group: Development/Libraries
Summary: Development files for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: kdelibs-devel
%description devel
This package contains libraries and header files for developing applications that use %{name}.
@if:debug_package
%debug_package
@fi:debug_package
%prep
%setup -q
%build
%cmake_kde4 -d build
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall -C build
@if:i18n
%find_lang %{name} --all-name --with-kde || touch %{name}.lang
@fi:i18n
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
@if:shared_libraries
## remove the following line if no dynamic libraries are provided by this package
/sbin/ldconfig
@fi:shared_libraries
@if:icons_mimetypes
## remove the following line if this package has no hicolor icons
touch --no-create %{_kde4_icondir}/hicolor >/dev/null 2>&1
## remove the following line if this package has no oxygen icons
touch --no-create %{_kde4_icondir}/oxygen >/dev/null 2>&1
@fi:icons_mimetypes
exit 0
@if:icons_mimetypes
%posttrans
@if:shared_libraries
## remove the following line if no dynamic libraries are provided by this package
/sbin/ldconfig
@fi:shared_libraries
update-desktop-database -q >/dev/null 2>&1
update-mime-database %{_kde4_mimedir} >/dev/null 2>&1
## remove the following line if this package has no hicolor icons
gtk-update-icon-cache %{_kde4_icondir}/hicolor >/dev/null 2>&1
## remove the following line if this package has no oxygen icons
gtk-update-icon-cache %{_kde4_icondir}/oxygen >/dev/null 2>&1
exit 0
@fi:icons_mimetypes
%postun
@if:shared_libraries
## remove the following line if no dynamic libraries are provided by this package
/sbin/ldconfig
@fi:shared_libraries
@if:icons_mimetypes
if [ $1 -eq 0 ]; then
\ update-desktop-database -q >/dev/null 2>&1
\ update-mime-database %{_kde4_mimedir} >/dev/null 2>&1
## remove the following two lines if this package has no hicolor icons
\ touch --no-create %{_kde4_icondir}/hicolor >/dev/null 2>&1
\ gtk-update-icon-cache %{_kde4_icondir}/hicolor >/dev/null 2>&1
## remove the following two lines if this package has no oxygen icons
\ touch --no-create %{_kde4_icondir}/oxygen >/dev/null 2>&1
\ gtk-update-icon-cache %{_kde4_icondir}/oxygen >/dev/null 2>&1
fi
@fi:icons_mimetypes
exit 0
@if:i18n
%files -f %{name}.lang
@else:i18n
%files
@fi:i18n
%defattr(-,root,root)
## note: this list is just an example; modify as required
# %{_kde4_bindir}/%{name}
# %{_kde4_datadir}/%{name}
# %{_kde4_dbusinterfacesdir}/org.kde.*.xml
# %{_kde4_kcfgdir}/*.kcfg
# %{_kde4_libdir}/kde4/*.so
# %{_kde4_icondir}/hicolor/*/*/*.png
# %{_kde4_icondir}/oxygen/*/*/*.png
# %{_kde4_icondir}/hicolor/scalable/*/*.svgz
# %{_kde4_icondir}/oxygen/scalable/*/*.svgz
# %{_kde4_xdgappsdir}/%{name}.desktop
# %{_kde4_xdgmimedir}/*.xml
# %{_kde4_servicesdir}/*.desktop
# %{_kde4_servicetypesdir}/*.desktop
# %config %{_kde4_configdir}/*.knsrc
# %doc %lang(en) %{_kde4_htmldir}/en/%{name}
## note: "man3" pages normally goes to devel package if any
# %{_mandir}/man?/%{name}.*
@standard_docs@
## note: eventually add the remaining documents (if any)
# @standard_docs_devel@
## remove this block if the package does not provide development stuff
%files devel
%defattr(-,root,root)
## note: this list is just an example; modify as required
# %{_kde4_includedir}/%{name}
# %{_kde4_libdir}/*.so
%changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@
- @spec_changelog_comment@

View File

@ -3,13 +3,14 @@
Name: @pck_name@ Name: @pck_name@
Version: @pck_version@ Version: @pck_version@
Release: @spec_first_release@@DISTRO_rpm@ Release: @spec_first_release@@DISTRO_rpm@
Summary: ... Summary: KDE Frameworks 5 ...
Group: ... Group: ...
Vendor: @VENDOR@ Vendor: @VENDOR@
Distribution: @DISTRO@ Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@> Packager: @packager_fullname@ <@packager_email@>
URL: https://kde.org URL: http://www.kde.org
Source: ... Source: ...
# Source: http://download.kde.org/stable/frameworks/%{majver}/...-%{version}.tar.xz
License: ... License: ...
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements. ## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
@ -18,6 +19,7 @@ BuildRequires: cmake
BuildRequires: rpm-macros-kde5 BuildRequires: rpm-macros-kde5
BuildRequires: extra-cmake-modules BuildRequires: extra-cmake-modules
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
BuildRoot: @rpm_default_buildroot@
%description %description
... ...
@ -54,14 +56,28 @@ This package contains libraries and header files for developing applications tha
%makeinstall -C build %makeinstall -C build
@if:i18n @if:i18n
%find_lang %{name} --with-qt --with-man --with-html --all-name || touch %{name}.lang %find_lang %{name}5_qt --with-qt --all-name || touch %{name}5_qt.lang
@fi:i18n @fi:i18n
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -n lib%{name}
@if:shared_libraries
## remove the following line if no dynamic libraries are provided by this package
/sbin/ldconfig
@fi:shared_libraries
exit 0
%postun -n lib%{name}
@if:shared_libraries
## remove the following line if no dynamic libraries are provided by this package
/sbin/ldconfig
@fi:shared_libraries
exit 0
@if:i18n @if:i18n
%files -f %{name}.lang %files -f %{name}5_qt.lang
@else:i18n @else:i18n
%files %files
@fi:i18n @fi:i18n

View File

@ -1,93 +0,0 @@
%define framework %(echo %name | sed "s|^kf6-||")
%define majver %(echo %version | cut -d. -f1-2)
Name: @pck_name@
Version: @pck_version@
Release: @spec_first_release@@DISTRO_rpm@
Summary: ...
Group: ...
Vendor: @VENDOR@
Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@>
URL: https://kde.org
Source: ...
License: ...
## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
## AUTOBUILDREQ-END
BuildRequires: cmake
BuildRequires: kf6-rpm-macros
BuildRequires: extra-cmake-modules
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%description
...
## remove the library block if this package does not provide library and development stuff
%package -n lib%{name}
Group: System/Libraries
Summary: Shared libraries for %{name}
%description -n lib%{name}
This package contains shared libraries for %{name}.
%package -n lib%{name}-devel
Group: Development/Libraries
Summary: Development files for %{name}
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%description -n lib%{name}-devel
This package contains libraries and header files for developing applications that use %{name}.
%prep
%setup -q
%build
%cmake_kf6
%cmake_build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%cmake_install
@if:i18n
%find_lang %{name} --with-qt --with-man --with-html --all-name || touch %{name}.lang
@fi:i18n
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@if:i18n
%files -f %{name}.lang
@else:i18n
%files
@fi:i18n
%defattr(-,root,root)
## note: this list is just an example; modify as required
# %{_kde6_bindir}/%{name}
# %{_kde6_datadir}/%{name}
## note: "man3" pages normally goes to devel package if any
# %{_mandir}/man?/%{name}.*
@standard_docs@
## note: eventually add the remaining documents (if any)
# @standard_docs_devel@
## remove this block if the package does not provide library and development stuff
%files -n lib%{name}
%defattr(-,root,root)
## note: this list is just an example; modify as required
# %{_kde6_libdir}/*.so
%files -n lib%{name}-devel
%defattr(-,root,root)
## note: this list is just an example; modify as required
# %{_kde6_includedir}/<KF5Framework>
# %{_kde6_includedir}/%{name}_version.h
# %{_kde6_libdir}/cmake/<KF5Framework>
# %{_kde6_libdir}/*.so
# %{_kde6_mkspecsdir}/qt_*.pri
%changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@
- @spec_changelog_comment@

View File

@ -26,6 +26,7 @@ Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires(post): %{__install_info} Requires(post): %{__install_info}
Requires(preun): %{__install_info} Requires(preun): %{__install_info}
@fi:infopages @fi:infopages
BuildRoot: @rpm_default_buildroot@
%description %description
... ...
@ -52,6 +53,8 @@ Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
@else:pck_library @else:pck_library
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
@fi:pck_library @fi:pck_library
## note: you can add this requirement if .pc files are provided by this package
#Requires: pkg-config
@if:pck_library @if:pck_library
%description -n lib%{name}-devel %description -n lib%{name}-devel
@ -82,6 +85,10 @@ Requires: gtk-doc
This package includes the %{name} API documentation. This package includes the %{name} API documentation.
@fi:pck_apidocs @fi:pck_apidocs
@if:debug_package
%debug_package
@fi:debug_package
%prep %prep
%setup -q %setup -q
@ -104,6 +111,14 @@ This package includes the %{name} API documentation.
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@if:pck_library
%post -n lib%{name} -p /sbin/ldconfig
%postun -n lib%{name} -p /sbin/ldconfig
@else:pck_library
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
@fi:pck_library
@if:infopages @if:infopages
@if:pck_library @if:pck_library
%post -n lib%{name}-devel %post -n lib%{name}-devel

View File

@ -1,3 +1,4 @@
## this macro only works for packages with name matching the regexp "ocaml-.*"
%define ocamlpck @pck_name_tail@ %define ocamlpck @pck_name_tail@
Name: @pck_name@ Name: @pck_name@
@ -14,14 +15,19 @@ License: ...
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements. ## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRequires: dune
BuildRequires: ocaml BuildRequires: ocaml
BuildRequires: ocaml-camlp4-devel
BuildRequires: ocaml-findlib BuildRequires: ocaml-findlib
## remove the following build requirement if this package is compiled
## by using the OCaml native-code compiler (ocamlopt)
Requires: ocaml-runtime
BuildRoot: @rpm_default_buildroot@
%description %description
%{summary}. ...
@if:pck_devel @if:pck_devel
## remove the following two blocks if there's no devel files
%package devel %package devel
Group: Development/Libraries/OCaml Group: Development/Libraries/OCaml
Summary: Development files for %{name} Summary: Development files for %{name}
@ -31,42 +37,64 @@ Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
This package contains libraries and signature files for developing applications that use %{name}. This package contains libraries and signature files for developing applications that use %{name}.
@fi:pck_devel @fi:pck_devel
%debug_package
%prep %prep
%setup -q %setup -q
%build %build
dune build ## remove the unsupported options (no real standard exists...)
./configure \\
\ --prefix %{_prefix} \\
\ --localstatedir %{_localstatedir} \\
\ --sharedstatedir %{_sharedstatedir} \\
\ --sysconfdir %{_sysconfdir} \\
\ --enable-tests \\
\ --enable-docs \\
\ --enable-examples \\
\ --disable-ldconf
## extra arguments that sometimes can be passed to './configure'
## -host %{_host}
## -cc "gcc ${RPM_OPT_FLAGS/-fomit-frame-pointer/}"
## --destdir %{buildroot}
%make all
%make opt
%install %install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
DESTDIR=%{buildroot} dune install --prefix "%{_prefix}" --libdir "%{_libdir}/ocaml" export OCAMLFIND_DESTDIR=%{buildroot}$(ocamlfind printconf destdir)
export DLLDIR=$OCAMLFIND_DESTDIR/stublibs
rm -rf %{buildroot}/usr/doc install -d $OCAMLFIND_DESTDIR/%{ocamlpck}
install -d $OCAMLFIND_DESTDIR/stublibs
make install
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_libdir}/ocaml/%{ocamlpck} ## note: this list is just an example; modify as required
%{_libdir}/ocaml/%{ocamlpck}/* # %dir %{_libdir}/ocaml/%{ocamlpck}
%exclude %{_libdir}/ocaml/%{ocamlpck}/*.a # %{_libdir}/ocaml/%{ocamlpck}/META
%exclude %{_libdir}/ocaml/%{ocamlpck}/*.cmx # %{_libdir}/ocaml/%{ocamlpck}/*.cma
%exclude %{_libdir}/ocaml/%{ocamlpck}/*.cmxa # %{_libdir}/ocaml/%{ocamlpck}/*.cmi
%exclude %{_libdir}/ocaml/%{ocamlpck}/*.mli # %{_libdir}/ocaml/%{ocamlpck}/*.cmxs
%{_libdir}/ocaml/stublibs/*.so* # %{_libdir}/ocaml/stublibs/*.so*
%doc LICENSE* # %doc COPYING
@if:pck_devel @if:pck_devel
## remove this block if there are no devel files
## note: this list is just an example; modify as required
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/ocaml/%{ocamlpck}/*.a # %{_libdir}/ocaml/%{ocamlpck}/*.a
%{_libdir}/ocaml/%{ocamlpck}/*.cmx # %{_libdir}/ocaml/%{ocamlpck}/*.cmx
%{_libdir}/ocaml/%{ocamlpck}/*.cmxa # %{_libdir}/ocaml/%{ocamlpck}/*.cmxa
%{_libdir}/ocaml/%{ocamlpck}/*.mli # %{_libdir}/ocaml/%{ocamlpck}/*.mli
#%doc CHANGES* README.md # %doc CHANGES README
# %doc doc/html/
# %doc examples/
@fi:pck_devel @fi:pck_devel
%changelog %changelog

View File

@ -8,13 +8,15 @@ Group: System/Libraries/Perl
Vendor: @VENDOR@ Vendor: @VENDOR@
Distribution: @DISTRO@ Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@> Packager: @packager_fullname@ <@packager_email@>
URL: https://www.cpan.org URL: http://www.cpan.org
Source: https://www.cpan.org/modules/by-module/... Source: http://www.cpan.org/modules/by-module/...
License: GPL, Artistic License: GPL, Artistic
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements. ## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRequires: perl-devel
Requires: perl >= %perl_major_ver Requires: perl >= %perl_major_ver
BuildRoot: @rpm_default_buildroot@
%description %description
... ...
@ -42,14 +44,14 @@ for dir in `find %{buildroot} -type d | grep $strid`; do
\ echo "%dir ${dir#%buildroot}" >> .packlist \ echo "%dir ${dir#%buildroot}" >> .packlist
done done
#find %{buildroot} -name *.so -exec chmod u+w {} \\;
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files -f .packlist %files -f .packlist
%defattr(-,root,root) %defattr(-,root,root)
@standard_docs@ @standard_docs@
## note: eventually add the remaining documents (if any)
# @standard_docs_devel@
%changelog %changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@ * @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@

View File

@ -1,55 +0,0 @@
%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0)
Name: @pck_name@
Version: @pck_version@
Release: @spec_first_release@@DISTRO_rpm@
Summary: ... - ...
Group: System/Libraries/Perl
Vendor: @VENDOR@
Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@>
URL: https://www.cpan.org
Source: https://www.cpan.org/modules/by-module/...
License: GPL, Artistic
## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
## AUTOBUILDREQ-END
Requires: perl >= %perl_major_ver
%description
...
%prep
%setup -q
%build
%{__perl} Build.PL installdirs=vendor
./Build
./Build test
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
./Build install --destdir=%{buildroot}
packlist=`find %{buildroot} -name .packlist`
[ -z "$packlist" ] && exit 1 || cat $packlist | \\
\ sed "s,%{buildroot},,g;s,.*/man/.*,&.gz,g" | \\
\ sort -u > .packlist && rm -f $packlist
strid=`echo $packlist | sed 's,.*auto\\(.*\\)/.packlist,\\1,'`
for dir in `find %{buildroot} -type d | grep $strid`; do
\ echo "%dir ${dir#%buildroot}" >> .packlist
done
#find %{buildroot} -name *.so -exec chmod u+w {} \\;
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files -f .packlist
%defattr(-,root,root)
@standard_docs@
%changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@
- @spec_changelog_comment@

View File

@ -1,4 +1,3 @@
%define pkgname %(echo %name | cut -d- -f2- | tr - _)
Name: @pck_name@ Name: @pck_name@
Version: @pck_version@ Version: @pck_version@
Release: @spec_first_release@@DISTRO_rpm@ Release: @spec_first_release@@DISTRO_rpm@
@ -13,38 +12,38 @@ License: ...
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements. ## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRequires: libpython-devel
Requires: python >= %python_version
BuildRoot: @rpm_default_buildroot@
%description %description
%{summary}. %{summary}.
%if 0%{?with_pyver}
%pyver_package
%endif
%prep %prep
%setup -q %setup -q
%build %build
CFLAGS="%{optflags}" %{__python} -m build --no-isolation --wheel CFLAGS="%{optflags}" %{__python} setup.py build
%install %install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%{__python} -m installer --destdir=%{buildroot} dist/*.whl %{__python} setup.py install \\
\ -O1 --skip-build \\
\ --root="%{buildroot}" \\
\ --install-headers=%{_includedir}/python \\
\ --install-lib=%{python_sitearch} \\
\ --record=%{name}.filelist
#%if "%{?with_pyver}" != "3" sed -i "\\,\\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist
## Rename any conflicting file outside of python site packages tree
#for f in %{_bindir}/pdm; do
# mv %{buildroot}${f}{,-%{?pyappend}}
#done
#%endif
%files %{?pyappend} %files -f %{name}.filelist
%defattr(-,root,root) %defattr(-,root,root)
%dir %{python_sitelib}/%{pkgname}-%{version}.dist-info ## note: this list is just an example; modify as required
%{python_sitelib}/%{pkgname}-%{version}.dist-info/* # %{python_sitearch}/%{name}.py*
%dir %{python_sitelib}/%{pkgname} # %{python_sitearch}/%{name}.so
%{python_sitelib}/%{pkgname}/*
@standard_docs@ @standard_docs@
## note: eventually add the remaining documents (if any)
# @standard_docs_devel@
%changelog %changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@ * @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@

View File

@ -1,49 +0,0 @@
%define pkgname %(echo %name | cut -d- -f2- | tr - _)
Name: @pck_name@
Version: @pck_version@
Release: @spec_first_release@@DISTRO_rpm@
Summary: ...
Group: System/Libraries
Vendor: @VENDOR@
Distribution: @DISTRO@
Packager: @packager_fullname@ <@packager_email@>
URL: ...
Source: ...
License: ...
## AUTOBUILDREQ-BEGIN
## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements.
## AUTOBUILDREQ-END
%description
%{summary}.
%if 0%{?with_pyver}
%pyver_package
%endif
%prep
%setup -q
%build
CFLAGS="%{optflags}" %{__python} setup.py build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%{__python} setup.py install \\
\ -O1 --skip-build \\
\ --root="%{buildroot}" \\
\ --install-headers=%{python_inc} \\
\ --install-lib=%{python_sitearch} \\
\ --record=%{name}.filelist
sed -i "\\,\\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist
%files %{?pyappend} -f %{name}.filelist
%defattr(-,root,root)
%dir %{python_sitearch}/%{pkgname}-%{version}-py*.egg-info
%{python_sitearch}/%{pkgname}-%{version}-py*.egg-info/*
@standard_docs@
%changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@
- @spec_changelog_comment@

View File

@ -19,6 +19,7 @@ BuildRequires: @build_tool@
Requires(post): %{__install_info} Requires(post): %{__install_info}
Requires(preun): %{__install_info} Requires(preun): %{__install_info}
@fi:infopages @fi:infopages
BuildRoot: @rpm_default_buildroot@
%description %description
... ...
@ -45,6 +46,10 @@ Requires: gtk-doc
This package includes the %{name} API documentation. This package includes the %{name} API documentation.
@fi:pck_apidocs @fi:pck_apidocs
@if:debug_package
%debug_package
@fi:debug_package
%prep %prep
%setup -q %setup -q

View File

@ -19,6 +19,7 @@ BuildRequires: @build_tool@
Requires(post): %{__install_info} Requires(post): %{__install_info}
Requires(preun): %{__install_info} Requires(preun): %{__install_info}
@fi:infopages @fi:infopages
BuildRoot: @rpm_default_buildroot@
%description %description
... ...

View File

@ -33,6 +33,8 @@ Source: ...
License: ... License: ...
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildArch: noarch
BuildRoot: @rpm_default_buildroot@
%description %description
... ...

View File

@ -41,35 +41,6 @@ function specfile.checksyntax() {
notify.note " * $specfile" notify.note " * $specfile"
local total_issues=0 local total_issues=0
local user_agent="Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/132.0"
# 0. checking if 'Source[0]' is a valid internet address
# (skip this test if no '%setup' section has been found)
test.skip $test_number || {
notify.note "$(test.num2str). ${NOTE}"\
"url""${NORM}..."
if [[ "$SPEC_URL" ]]; then
{ notify.debug "\
\`url': "$"checking Source URL with: ""\`curl -s -o /dev/null -w \"%{http_code}\" -A \"${user_agent}\" $SPEC_URL'"
}
http_code=`curl -s -o /dev/null -w "%{http_code}" -A "${user_agent}" $SPEC_URL`
if [ "$http_code" != "200" ]; then
if [ "${http_code:0:2}" == "30" ]; then
http_effective_url=`curl -w "%{url_effective}" -I -L -s -o /dev/null -A "${user_agent}" -S $SPEC_URL`
{ notify.warning "\
\`url': "$"redirect detected: replacing from \`$SPEC_URL' to \`${http_effective_url}'"
let "total_issues += 1";
}
sed -i "s|^\(URL:[[:space:]]*\)$SPEC_URL.*|\1${http_effective_url}|" $specfile
else
{ notify.error "\
\`url': "$"invalid return code for \`$SPEC_URL': $http_code"
let "total_issues += 1"; }
fi
fi
fi; }
test_number=$(($test_number + 1))
# 1. checking if 'Source[0]' is a valid internet address # 1. checking if 'Source[0]' is a valid internet address
# (skip this test if no '%setup' section has been found) # (skip this test if no '%setup' section has been found)

View File

@ -37,7 +37,7 @@ eval $(autospec -q --eval=logging_dir)
[ "$logging_dir" ] || logging_dir="${tmppath_dir:-/var/tmp}/@package@" [ "$logging_dir" ] || logging_dir="${tmppath_dir:-/var/tmp}/@package@"
# FIXME : get the list of perl modules from the repository # FIXME : get the list of perl modules from the repository
# ftp://ftp.openmamba.org:21/pub/openmamba/devel/SPECS # ftp://ftp.qilinux.it:21/pub/QiLinux/devel/SPECS
# WARNING : this variable used for test only # WARNING : this variable used for test only
mperl_lst="perl-Archive-Tar.spec" mperl_lst="perl-Archive-Tar.spec"