From repocop@altlinux.org Thu Nov 21 02:24:15 MSK 2024
From: "Repocop Q. A. Robot" <repocop@altlinux.org>

Subject: repocop NMU

- NMU (by repocop). See http://www.altlinux.org/Tools/Repocop
- applied repocop fixes:
  * specfile-useradd-n for lightsquid
  * postclean-03-private-rpm-macros for the spec file

--- a/lightsquid.spec	2024-11-21 02:24:15.802488658 +0300
+++ b/lightsquid.spec	2024-11-21 02:24:15.802488658 +0300
@@ -39,59 +39,59 @@
 %prep
 %setup -n %name-%version
 
-%__subst "s|/var/www/html/lightsquid/lang|%_datadir/%name/lang|g"  lightsquid.cfg
-%__subst "s|/var/www/html/lightsquid/tpl|%_datadir/%name/tpl|g" lightsquid.cfg
-%__subst "s|/var/www/html/lightsquid/ip2name|%_datadir/%name/ip2name|g" lightsquid.cfg
-%__subst "s|/var/www/html/lightsquid/report|%_localstatedir/%name|g" lightsquid.cfg
-%__subst "s|\$cfgpath             =\"/var/www/html/lightsquid|\$cfgpath             =\"%lightsquid_confdir|g" lightsquid.cfg
-%__subst "s|\$lockpath            =\$reportpath|\$lockpath            =\"%_lockdir/%name\"|g" lightsquid.cfg
-%__subst 's|require "ip2name|require "$ip2namepath|g' lightparser.pl
-%__subst "s|lightsquid.cfg|%lightsquid_confdir/lightsquid.cfg|g" *.cgi *.pl
-%__subst "s|common.pl|%_datadir/%name/common.pl|g" *.cgi *.pl
-%__subst "s|/etc/squid/users.txt|/etc/lightsquid/users.txt|g" ip2name/ip2name.*
+sed -i "s|/var/www/html/lightsquid/lang|%_datadir/%name/lang|g"  lightsquid.cfg
+sed -i "s|/var/www/html/lightsquid/tpl|%_datadir/%name/tpl|g" lightsquid.cfg
+sed -i "s|/var/www/html/lightsquid/ip2name|%_datadir/%name/ip2name|g" lightsquid.cfg
+sed -i "s|/var/www/html/lightsquid/report|%_localstatedir/%name|g" lightsquid.cfg
+sed -i "s|\$cfgpath             =\"/var/www/html/lightsquid|\$cfgpath             =\"%lightsquid_confdir|g" lightsquid.cfg
+sed -i "s|\$lockpath            =\$reportpath|\$lockpath            =\"%_lockdir/%name\"|g" lightsquid.cfg
+sed -i 's|require "ip2name|require "$ip2namepath|g' lightparser.pl
+sed -i "s|lightsquid.cfg|%lightsquid_confdir/lightsquid.cfg|g" *.cgi *.pl
+sed -i "s|common.pl|%_datadir/%name/common.pl|g" *.cgi *.pl
+sed -i "s|/etc/squid/users.txt|/etc/lightsquid/users.txt|g" ip2name/ip2name.*
 
 iconv -f WINDOWS-1251 -t UTF8 lang/ru.lng > lang/ru-utf8.lng
-%__subst "s|windows-1251|utf8|g" lang/ru-utf8.lng
+sed -i "s|windows-1251|utf8|g" lang/ru-utf8.lng
 
 	
 %install
-%__mkdir_p %buildroot%_sbindir
-%__mkdir_p %buildroot%lightsquid_confdir
-%__mkdir_p %buildroot%_sysconfdir/cron.d
-%__mkdir_p %buildroot%_datadir/%name/{lang,ip2name,tpl}
-%__mkdir_p %buildroot%_localstatedir/%name
-%__mkdir_p %buildroot%lightdir
-%__mkdir_p %buildroot%_lockdir/%name
+mkdir -p %buildroot%_sbindir
+mkdir -p %buildroot%lightsquid_confdir
+mkdir -p %buildroot%_sysconfdir/cron.d
+mkdir -p %buildroot%_datadir/%name/{lang,ip2name,tpl}
+mkdir -p %buildroot%_localstatedir/%name
+mkdir -p %buildroot%lightdir
+mkdir -p %buildroot%_lockdir/%name
 
 # install bin
-%__install -p -m 755 lightparser.pl %buildroot%_sbindir/
+install -p -m 755 lightparser.pl %buildroot%_sbindir/
 
 # install configs
-%__install -p -m 644 lightsquid.cfg %buildroot%lightsquid_confdir/lightsquid.cfg
-%__install -p -m 644 group.cfg.src %buildroot%lightsquid_confdir/group.cfg
-%__install -p -m 644 realname.cfg %buildroot%lightsquid_confdir/realname.cfg
+install -p -m 644 lightsquid.cfg %buildroot%lightsquid_confdir/lightsquid.cfg
+install -p -m 644 group.cfg.src %buildroot%lightsquid_confdir/group.cfg
+install -p -m 644 realname.cfg %buildroot%lightsquid_confdir/realname.cfg
 
 # install cron
-%__cat << EOF > %buildroot%_sysconfdir/cron.d/lightsquid
+cat << EOF > %buildroot%_sysconfdir/cron.d/lightsquid
 55 * * * *     lightsquid /usr/sbin/lightparser.pl today
 EOF
 
 
 # install lib
-%__install -p -m 644 common.pl %buildroot%_datadir/%name/
-%__install -p -m 755 check-setup.pl %buildroot%_datadir/%name/
-%__install -p -m 644 lang/[^A-Z]*.lng %buildroot%_datadir/%name/lang/
-%__install -p -m 644 ip2name/[^A-Z]* %buildroot%_datadir/%name/ip2name/
-%__cp -aRf tpl/[^A-Z]* %buildroot%_datadir/%name/tpl/
-##%__install -p -m 644 tpl/[^A-Z]* %buildroot%_datadir/%name/tpl/
+install -p -m 644 common.pl %buildroot%_datadir/%name/
+install -p -m 755 check-setup.pl %buildroot%_datadir/%name/
+install -p -m 644 lang/[^A-Z]*.lng %buildroot%_datadir/%name/lang/
+install -p -m 644 ip2name/[^A-Z]* %buildroot%_datadir/%name/ip2name/
+cp -aRf tpl/[^A-Z]* %buildroot%_datadir/%name/tpl/
+##install -p -m 644 tpl/[^A-Z]* %buildroot%_datadir/%name/tpl/
 
 # install web
-#%__install -p -m 644 .htaccess %buildroot%apache_home/%name/
-%__install -p -m 755 [^A-Z]*.cgi %buildroot%apache_home/%name/
+#install -p -m 644 .htaccess %buildroot%apache_home/%name/
+install -p -m 755 [^A-Z]*.cgi %buildroot%apache_home/%name/
 
 %pre
 /usr/sbin/groupadd -r -f %name &> /dev/null ||:
-/usr/sbin/useradd -r -g %name -G squid -d %_localstatedir/%name -c 'Log parser lightsquid' -s /bin/false -n %name &> /dev/null ||:
+/usr/sbin/useradd -r -g %name -G squid -d %_localstatedir/%name -c 'Log parser lightsquid' -s /bin/false -N %name &> /dev/null ||:
 
 %post
 if [[ -d %lightdir/report ]]; then
