Browse Source

procps-3.3.17-1

Tomohiro "Tomo-p" KATO 2 years ago
parent
commit
4960fc9a50
1 changed files with 56 additions and 28 deletions
  1. 56 28
      p/procps/procps-vl.spec

+ 56 - 28
p/procps/procps-vl.spec

@@ -1,13 +1,14 @@
 %bcond_with systemd
+%bcond_with ja_po
 
 %define origname procps-ng
 
 Summary: System and process monitoring utilities.
 Summary(ja): システムやプロセスのモニタリングユーティリティ
 Name: procps
-Version: 3.3.16
+Version: 3.3.17
 Release: 1%{?_dist_release}%{?with_systemd:.systemd}
-Group: Applications/System
+Group: system
 Vendor: Project Vine
 Distribution: Vine Linux
 Packager: daisuke
@@ -16,14 +17,12 @@ License: GPL
 Url: https://gitlab.com/procps-ng/procps
 # alternative: http://sourceforge.net/projects/procps-ng/
 Source: https://downloads.sourceforge.net/project/procps-ng/Production/%{origname}-%{version}.tar.xz
-BuildRoot: %{_tmppath}/%{name}-%{version}-root
-Requires(post): /sbin/ldconfig, /bin/rm
-Requires(postun): /sbin/ldconfig
-Obsoletes: procps-X11, pgrep
-
+Patch1: pwait-to-pidwait.patch
 # Vine source/patches
 Source10: procps-ng-3.3.10-ja.po
 
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+
 BuildRequires: ncurses-devel
 %if %{with systemd}
 BuildRequires: systemd-devel
@@ -31,6 +30,8 @@ BuildRequires: systemd-devel
 BuildRequires: elogind-devel
 %endif
 
+Requires(post): /bin/rm
+
 %description
 The procps package contains a set of system utilities that provide
 system information. Procps includes ps, free, skill, snice, tload,
@@ -54,10 +55,11 @@ and CPU activity.
 システムの状態を知るためのユーティリティ集です. 実行中のプロセス, 使用
 可能なメモリ容量, 現在ログインしているユーザの情報等を得ることができます.
 
+
 %package devel
 Summary:     System and process monitoring utilities
 Summary(ja): procpsを利用した開発に必要なファイル
-Group:       Development/Libraries
+Group:       programming
 Requires:    %{name} = %{version}-%{release}
 
 %description devel
@@ -67,25 +69,26 @@ System and process monitoring utilities development headers
  このパッケージにはprocpsを利用した開発に必要なヘッダ・ライブラリファイル
 が収録されています。
 
+
+%debug_package
+
+
 %prep
-%setup -q -n %{origname}-%{version}
+%setup -q
+%autopatch -p1
 
 # vine
+%if %{with ja_po}
 cp -f %{SOURCE10} po/ja.po
-
 #echo "ja" > po/LINGUAS
+%endif
+
 
 %build
 autoreconf --verbose --force --install
-./configure --prefix=/ \
-            --bindir=%{_bindir} \
+%configure \
+            --exec-prefix=/ \
             --sbindir=%{_syssbindir} \
-            --libdir=%{_libdir} \
-            --datadir=%{_datadir} \
-            --localedir=%{_datadir}/locale \
-            --mandir=%{_mandir} \
-            --includedir=%{_includedir} \
-            --sysconfdir=%{_sysconfdir} \
             --docdir=/unwanted \
             --disable-static \
             --disable-w-from \
@@ -94,6 +97,7 @@ autoreconf --verbose --force --install
             --enable-skill \
             --enable-sigwinch \
             --disable-libselinux \
+            --enable-pidwait \
 %if %{with systemd}
             --with-systemd
 %else
@@ -103,11 +107,14 @@ autoreconf --verbose --force --install
 
 make CFLAGS="%{optflags}"
 
-sed -i -e 's|/procps-ng-.*-dirty/|/|' po/Makefile
-sed -i -e 's|^procps-ng-.*-dirty/||' po/POTFILES.in
+#sed -i -e 's|/procps-ng-.*-dirty/|/|' po/Makefile
+#sed -i -e 's|^procps-ng-.*-dirty/||' po/POTFILES.in
 
+%if %{with ja_po}
 make -C po update-po
 make -C po ja.gmo
+%endif
+
 
 %install
 make DESTDIR=%{buildroot} install
@@ -117,26 +124,39 @@ mkdir -p %{buildroot}%{_sysconfdir}/sysctl.d
 
 # for compatibility
 mkdir -p %{buildroot}%{_sysbindir}
-mv %{buildroot}%{_bindir}/ps %{buildroot}%{_sysbindir}/
-ln -sf %{_sysbindir}/ps %{buildroot}%{_bindir}/ps
+ln -sf ..%{_bindir}/ps %{buildroot}%{_sysbindir}/ps
+mkdir -p %{buildroot}%{_syssbindir}
+ln -sf ..%{_bindir}/pidof %{buildroot}%{_syssbindir}/pidof
 
 rm -f %{buildroot}/%{_libdir}/libprocps.la
 rm -rf %{buildroot}/unwanted
-rm -f %{buildroot}%{_bindir}/pidof
 
-%find_lang procps-ng
+# these are created by make, yet empty. This causes rpmbuild errors.
+rm -rf %{buildroot}%{_mandir}/{pl,pt_BR,sv}/man5
+
+%find_lang procps-ng --all-name --with-man
+
 
 %clean
 rm -rf %{buildroot}
 
-%post -p /sbin/ldconfig
 
-%postun -p /sbin/ldconfig
+%pre
+if [ -L %{_bindir}/ps ]; then
+  rm -f %{_bindir}/ps
+fi
+if [ -L %{_bindir}/pidof ]; then
+  rm -f %{_bindir}/pidof
+fi
+if [ -f /sbin/pidof ]; then
+  rm -f /sbin/pidof
+fi
+
 
 %files -f procps-ng.lang
 %defattr(-,root,root,-)
 %license COPYING COPYING.LIB
-%doc AUTHORS NEWS README*
+%doc AUTHORS NEWS
 %{_libdir}/libprocps.so.*
 %{_bindir}/*
 %{_sysbindir}/*
@@ -149,12 +169,20 @@ rm -rf %{buildroot}
 
 %files devel
 %defattr(-,root,root,-)
-%doc COPYING COPYING.LIB
+%license COPYING COPYING.LIB
 %{_libdir}/libprocps.so
 %{_libdir}/pkgconfig/libprocps.pc
 %{_includedir}/proc
 
+
 %changelog
+* Fri Oct 29 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.3.17-1
+- new upstream release.
+- dropped ldconfig scriptlets.
+- enabled pidof
+- imported Patch1 from rawhide.
+- enabled pwait as pidwait.
+
 * Thu Apr 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.3.16-1
 - new upstream release.
 - added systemd support (disabled as default).