commit 5dc673eb52ddcd5350d637b59378e1763bd46fbe
Author: Elan Ruusamäe <[email protected]>
Date:   Thu Jul 28 20:36:26 2005 +0000

    - external specs adapterize
    - make it not to screw *rc-scripts.spec
    
    Changed files:
        adapter.awk -> 1.166

 adapter.awk | 37 ++++++++++++++++++++++---------------
 1 file changed, 22 insertions(+), 15 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index 58a0b73..ec38828 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -760,11 +760,17 @@ function use_files_macros(        i, n, t, a)
        gsub("^%{_sbindir}", "%attr(755,root,root) %{_sbindir}")
        gsub("^%{_bindir}", "%attr(755,root,root) %{_bindir}")
 
-       gsub("%{_sysconfdir}\/rc\.d\/init.d", "/etc/rc.d/init.d")
-       gsub("%{_sysconfdir}\/init.d", "/etc/rc.d/init.d")
+       # replace back
+       gsub("%{_sysconfdir}/rc\.d/init.d", "/etc/rc.d/init.d")
+       gsub("%{_sysconfdir}/init.d", "/etc/init.d")
        gsub("%{_sysconfdir}\/sysconfig", "/etc/sysconfig")
 
-       if (/\/etc\/rc\.d\/init\.d/) {
+       # /etc/init.d -> /etc/rc.d/init.d
+       if (!/^\/etc\/init\.d$/) {
+                gsub("/etc/init.d", "/etc/rc.d/init.d")
+       }
+
+       if (/\/etc\/rc\.d\/init\.d\// && !/functions/) {
                if (!/%attr.*\/etc\/rc\.d\/init\.d/) {
                        $0 = "%attr(754,root,root) " $0
                }
@@ -773,7 +779,6 @@ function use_files_macros(  i, n, t, a)
                }
        }
 
-
        if (/lib.+\.so/ && !/^%attr.*/) {
                $0 = "%attr(755,root,root) " $0
        }
@@ -781,20 +786,22 @@ function use_files_macros(        i, n, t, a)
        # /etc/sysconfig files
        # %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) 
/etc/sysconfig/*
        # attr not required, allow default 644 attr
-       if (/\/etc\/sysconfig\// && /%config/ && !/%config\(noreplace\)/) {
-               gsub("%config", "%config(noreplace)")
-       }
+       if (!/network-scripts/) {
+               if (/\/etc\/sysconfig\// && /%config/ && 
!/%config\(noreplace\)/) {
+                       gsub("%config", "%config(noreplace)")
+               }
 
-       if (/\/etc\/sysconfig\// && !/%config\(noreplace\)/) {
-               $NF = "%config(noreplace) " $NF
-       }
+               if (/\/etc\/sysconfig\// && !/%config\(noreplace\)/) {
+                       $NF = "%config(noreplace) " $NF
+               }
 
-       if (/\/etc\/sysconfig\// && /%attr\(755/) {
-               gsub("^%attr\(... *,", "%attr(640,");
-       }
+               if (/\/etc\/sysconfig\// && /%attr\(755/) {
+                       gsub("^%attr\(... *,", "%attr(640,");
+               }
 
-       if (/\/etc\/sysconfig\// && !/%verify/) {
-               gsub("/etc/sysconfig", "%verify(not size mtime md5) 
/etc/sysconfig");
+               if (/\/etc\/sysconfig\// && !/%verify/) {
+                       gsub("/etc/sysconfig", "%verify(not size mtime md5) 
/etc/sysconfig");
+               }
        }
 
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/adapter.git/commitdiff/6ca0126d4d0c8c79feb7db10b0a0fade0f3b8885

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to