Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37549331
en ru br
Репозитории ALT
S:9.6-alt2
5.1: 6.4-alt1.1
4.1: 6.4-alt1.1
4.0: 6.4-alt1
www.altlinux.org/Changes

Группа :: Разработка/Прочее
Пакет: rpmdevtools

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: rpmdevtools-9.6-alt.patch
Скачать


 .gear/rpmdevtools.spec    | 158 ++++++++++++++++++++++++++++++++++++++++++++++
 .gear/rules               |   3 +
 .gear/tags/list           |   1 +
 rpmdev-bumpspec           |  13 +++-
 rpmdev-newspec.in         |   5 +-
 rpmdev-setuptree          |  10 ---
 spectemplate-dummy.spec   |   4 +-
 spectemplate-lib.spec     |  27 ++++----
 spectemplate-minimal.spec |   9 ++-
 9 files changed, 193 insertions(+), 37 deletions(-)
diff --git a/.gear/rpmdevtools.spec b/.gear/rpmdevtools.spec
new file mode 100644
index 0000000..0448217
--- /dev/null
+++ b/.gear/rpmdevtools.spec
@@ -0,0 +1,158 @@
+Group: Development/Other
+# BEGIN SourceDeps(oneline):
+BuildRequires(pre): rpm-macros-emacs
+BuildRequires: /usr/bin/pod2man rpm-build-python3
+# END SourceDeps(oneline)
+# see https://bugzilla.altlinux.org/show_bug.cgi?id=10382
+%define _localstatedir %{_var}
+%global spectool_version 1.0.10
+
+Name:           rpmdevtools
+Version:        9.6
+Release:        alt2
+Summary:        RPM Development Tools
+
+# rpmdev-setuptree is GPLv2, everything else GPLv2+
+License:        GPLv2+ and GPLv2
+URL:            https://pagure.io/rpmdevtools
+# Sources:      https://releases.pagure.org/rpmdevtools/%{name}-%{version}.tar.xz
+Source:         %name-%version.tar
+
+# Backports from upstream
+Patch:          %name-%version-alt.patch
+
+BuildArch:      noarch
+# help2man, pod2man, *python for creating man pages
+BuildRequires:  help2man
+BuildRequires:  %{_bindir}/pod2man
+BuildRequires:  rpm-build-perl
+BuildRequires:  python3
+BuildRequires:  python3-module-rpm
+BuildRequires:  bash-completion
+# rpmdev-spectool
+BuildRequires:  python3(progressbar)
+BuildRequires:  python3(requests)
+BuildRequires:  python3(rpm)
+Provides:       spectool = %{spectool_version}
+Requires:       curl
+Requires:       diffutils
+Requires:       fakeroot
+Requires:       file
+Requires:       findutils
+Requires:       gawk
+Requires:       grep
+Requires:       python3-module-rpm
+Requires:       sed
+#Requires:       emacs-filesystem
+
+###########################
+# removed/split components:
+Requires: spectool
+Requires: qa-robot
+Requires: rpmpeek
+%add_findreq_skiplist /usr/share/rpmdevtools/*
+%add_findreq_skiplist /etc/rpmdevtools/template.init
+%add_findreq_skiplist %_bindir/rpmdev-extract
+Packager: Igor Vlasenko <viy@altlinux.org>
+###########################
+
+
+%description
+This package contains scripts and (X)Emacs support files to aid in
+development of RPM packages.
+rpmdev-setuptree    Create RPM build tree within user's home directory
+rpmdev-diff         Diff contents of two archives
+rpmdev-newspec      Creates new .spec from template
+rpmdev-rmdevelrpms  Find (and optionally remove) "development" RPMs
+rpmdev-checksig     Check package signatures using alternate RPM keyring
+rpminfo             Print information about executables and libraries
+rpmdev-md5/sha*     Display checksums of all files in an archive file
+rpmdev-vercmp       RPM version comparison checker
+rpmdev-wipetree     Erase all files within dirs created by rpmdev-setuptree
+rpmdev-extract      Extract various archives, "tar xvf" style
+rpmdev-bumpspec     Bump revision in specfile
+...and many more.
+
+
+%prep
+%setup -q
+%patch -p1
+
+grep -lF "%{_bindir}/python " * \
+| xargs sed -i -e "s|%{_bindir}/python |%{_bindir}/python3 |"
+
+
+%build
+%autoreconf
+%configure --libdir=%{_prefix}/lib
+%make_build
+
+
+%install
+
+%makeinstall_std
+
+echo %%{_datadir}/bash-completion > %{name}.files
+[ -d $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d ] && \
+echo %%{_sysconfdir}/bash_completion.d > %{name}.files
+
+#for dir in %{_emacs_sitestart_dir} ; do
+#  install -dm 755 $RPM_BUILD_ROOT$dir
+#  ln -s %{_datadir}/rpmdevtools/rpmdev-init.el $RPM_BUILD_ROOT$dir
+#  touch $RPM_BUILD_ROOT$dir/rpmdev-init.elc
+#done
+#for rpm404_ghost in %{_emacs_sitestart_dir}/rpmdev-init.elc
+#do
+#    mkdir -p %buildroot`dirname "$rpm404_ghost"`
+#    touch %buildroot"$rpm404_ghost"
+#done
+
+pushd %buildroot%_man1dir
+rm -f spectool* rpmpeek* rpmargs* rpmelfsym* rpmfile* rpmsodiff* rpmsoname*
+popd
+pushd %buildroot%_bindir
+rm -f spectool rpmpeek rpmargs rpmelfsym rpmfile rpmsodiff rpmsoname
+popd
+
+%files -f %{name}.files
+%doc --no-dereference COPYING
+%doc NEWS
+%config(noreplace) %{_sysconfdir}/rpmdevtools/
+%{_datadir}/rpmdevtools/
+%{_bindir}/rpm*
+#%{_emacs_sitestart_dir}/rpmdev-init.el
+#%ghost %{_emacs_sitestart_dir}/rpmdev-init.elc
+%{_mandir}/man[18]/*.[18]*
+
+
+%changelog
+* Mon Sep 05 2022 Evgeny Sinelnikov <sin@altlinux.org> 9.6-alt2
+- Add support of ALT releases in rpmdev-bumpspec
+- Adopt for ALT first spectemplates: dummy, lib and minimal
+- Adopt rpmdev-newspec support for ALT specific rpm
+
+* Mon Sep 05 2022 Evgeny Sinelnikov <sin@altlinux.org> 9.6-alt1
+- Update to latest release
+
+* Mon May 17 2021 Igor Vlasenko <viy@altlinux.org> 8.10-alt2
+- fixed build
+
+* Tue Jan 14 2020 Igor Vlasenko <viy@altlinux.ru> 8.10-alt1
+- new version
+
+* Wed Oct 26 2011 Vitaly Kuznetsov <vitty@altlinux.ru> 6.4-alt1.1.1.1
+- Rebuild with Python-2.7
+
+* Tue Nov 17 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 6.4-alt1.1.1
+- Rebuilt with python 2.6
+
+* Sun Feb 10 2008 Grigory Batalov <bga@altlinux.ru> 6.4-alt1.1
+- Rebuilt with python-2.5.
+
+* Wed Dec 05 2007 Igor Vlasenko <viy@altlinux.ru> 6.4-alt1
+- first build for ALT Linux;
+- removed included at@' qa-robot :)
+- spectool is built in a separate source;
+- added dependency on qa-robot and spectool.
+- TODO: emacs and xemacs.
+
diff --git a/.gear/rules b/.gear/rules
new file mode 100644
index 0000000..92e23ca
--- /dev/null
+++ b/.gear/rules
@@ -0,0 +1,3 @@
+spec: .gear/rpmdevtools.spec
+diff: RPMDEVTOOLS_9_6:. . name=@name@-@version@-alt.patch
+tar: RPMDEVTOOLS_9_6:.
diff --git a/.gear/tags/list b/.gear/tags/list
new file mode 100644
index 0000000..14221b4
--- /dev/null
+++ b/.gear/tags/list
@@ -0,0 +1 @@
+9618627bddadea244b4b0d5e240326cf2093b03f RPMDEVTOOLS_9_6
diff --git a/rpmdev-bumpspec b/rpmdev-bumpspec
index b8f4047..f005002 100755
--- a/rpmdev-bumpspec
+++ b/rpmdev-bumpspec
@@ -41,10 +41,16 @@ class SpecFile(object):
     def __init__(self, filename, verbose=False, string=None):
         self.verbose = verbose
         self.string = string
+        self.altrelease = False
 
         self.filename = filename
         with open(filename) as f:
             self.lines = f.readlines()
+        for i in range(len(self.lines)):
+            if SpecFile._altrelease_pattern.match(self.lines[i]):
+                self.altrelease = True
+
+    _altrelease_pattern = re.compile(r"^Release\s*:\s*alt\d+.*", re.I)
 
     # supported release value macro definitions
     _macro_bump_patterns = (
@@ -55,6 +61,7 @@ class SpecFile(object):
     )
     # normal "Release:" tag lines
     _tag_bump_patterns = (
+        re.compile(r"^Release\s*:\s*alt(\d+.*)", re.I),
         re.compile(r"^Release\s*:\s*(\d+.*)", re.I),
         re.compile(r"^Release\s*:\s+%release_func\s+(\d+.*)", re.I),
     )
@@ -139,7 +146,7 @@ class SpecFile(object):
             r = vr[rpos + 1:]
             v = vr[:rpos]
         else:
-            r = "1%{?dist}"
+            r = "alt1" if self.altrelease else "1%{?dist}"
             v = vr
 
         changed = False
@@ -182,12 +189,12 @@ class SpecFile(object):
         for i in range(len(self.lines)):
             if SpecFile._changelog_pattern.match(self.lines[i]):
                 if len(evr):
-                    evrstring = ' - %s' % evr
+                    evrstring = ' %s' % evr if self.altrelease else ' - %s' % evr
                 else:
                     evrstring = ''
                 if datestamp:
                     date = self.validateDatestamp(datestamp)
-                elif legacy_datestamp:
+                elif legacy_datestamp or self.altrelease:
                     date = time.strftime("%a %b %d %Y", time.gmtime())
                 else:
                     date = time.strftime("%a %b %e %T %Z %Y", time.localtime())
diff --git a/rpmdev-newspec.in b/rpmdev-newspec.in
index 27af10f..34878f6 100644
--- a/rpmdev-newspec.in
+++ b/rpmdev-newspec.in
@@ -164,6 +164,9 @@ fi
 # major * 10000 + minor * 100 ( + micro perhaps later )
 rpmver=$(( $rpmmaj * 10000 + $rpmmin * 100 ))
 
+rpmspecific="${NEWSPEC_RPM_SPECIFIC:-$ALT_SPECIFIC}" # rpm specific
+[[ $rpmspecific ]] || rpmspecific=$(LC_ALL=C rpm -E "%{_vendor}" 2>/dev/null)
+
 specfilter=
 if [[ -z $spectype ]] ; then
     case $appname in
@@ -259,7 +262,7 @@ if [[ $rpmver -ge 40800 ]] ; then # >= 4.8 (RHEL >= 6, Fedora >= 13)
     s|^make install DESTDIR=\\\$RPM_BUILD_ROOT|%make_install|Mg
 "
 fi
-if [[ $rpmver -ge 41100 ]] ; then # >= 4.11 (RHEL >= 7, Fedora >= 19)
+if [[ $rpmver -ge 41100 ]] && [[ "$rpmspecific" != "alt" ]] ; then # >= 4.11 (RHEL >= 7, Fedora >= 19)
     # filter unnecessary %license availability detection
     specfilter+="
     s|^%\\{!\\?_licensedir:%global license %%doc\\}\\n||Mg
diff --git a/rpmdev-setuptree b/rpmdev-setuptree
index acd08d9..42abd87 100755
--- a/rpmdev-setuptree
+++ b/rpmdev-setuptree
@@ -53,16 +53,6 @@ EOF
 #       echo "$MAKE  make" >> $RPMMACROS
 #       }
 #
-ISTOP=`grep -c ^%__arch_install_post $RPMMACROS`
-[ $ISTOP -lt 1 ] && {
-    cat <<\EOF >> $RPMMACROS
-
-%__arch_install_post \
-    [ "%{buildarch}" = "noarch" ] || QA_CHECK_RPATHS=1 ; \
-    case "${QA_CHECK_RPATHS:-}" in [1yY]*) /usr/lib/rpm/check-rpaths ;; esac \
-    /usr/lib/rpm/check-buildroot
-EOF
-}
 RPMDIR=`rpm --eval "%{_rpmdir}"`
 SRCDIR=`rpm --eval "%{_sourcedir}"`
 SPECDIR=`rpm --eval "%{_specdir}"`
diff --git a/spectemplate-dummy.spec b/spectemplate-dummy.spec
index 45f2f0a..c684ec7 100644
--- a/spectemplate-dummy.spec
+++ b/spectemplate-dummy.spec
@@ -1,10 +1,10 @@
 Name:           
 Version:        1.0
-Release:        1%{?dist}
+Release:        alt1
 Summary:        Dummy test package
 
 License:        Public Domain
-URL:            http://fedoraproject.org/
+URL:            http://www.altlinux.org/
 
 %description
 
diff --git a/spectemplate-lib.spec b/spectemplate-lib.spec
index bfc0a52..9c79228 100644
--- a/spectemplate-lib.spec
+++ b/spectemplate-lib.spec
@@ -1,6 +1,6 @@
 Name:           
 Version:        
-Release:        1%{?dist}
+Release:        alt1
 Summary:        
 
 License:        
@@ -14,12 +14,12 @@ Requires:
 
 
 %package        devel
-Summary:        Development files for %{name}
-Requires:       %{name}%{?_isa} = %{version}-%{release}
+Summary:        Development files for %name
+Requires:       %name = %version-%release
 
 %description    devel
-The %{name}-devel package contains libraries and header files for
-developing applications that use %{name}.
+The %name-devel package contains libraries and header files for
+developing applications that use %name.
 
 
 %prep
@@ -28,27 +28,22 @@ developing applications that use %{name}.
 
 %build
 %configure --disable-static
-make %{?_smp_mflags}
+%make_build
 
 
 %install
-make install DESTDIR=$RPM_BUILD_ROOT
-find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
-
-
-%{?ldconfig_scriptlets}
+%makeinstall_std
 
 
 %files
-%{!?_licensedir:%global license %%doc}
-%license add-license-file-here
+%doc add-license-file-here
 %doc add-main-docs-here
-%{_libdir}/*.so.*
+%_libdir/*.so.*
 
 %files devel
 %doc add-devel-docs-here
-%{_includedir}/*
-%{_libdir}/*.so
+%_includedir/*
+%_libdir/*.so
 
 
 %changelog
diff --git a/spectemplate-minimal.spec b/spectemplate-minimal.spec
index c0d192f..7cb71b4 100644
--- a/spectemplate-minimal.spec
+++ b/spectemplate-minimal.spec
@@ -1,6 +1,6 @@
 Name:           
 Version:        
-Release:        1%{?dist}
+Release:        alt1
 Summary:        
 
 License:        
@@ -19,16 +19,15 @@ Requires:
 
 %build
 %configure
-make %{?_smp_mflags}
+%make_build
 
 
 %install
-make install DESTDIR=$RPM_BUILD_ROOT
+%makeinstall_std
 
 
 %files
-%{!?_licensedir:%global license %%doc}
-%license add-license-file-here
+%doc add-license-file-here
 %doc add-docs-here
 
 
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin