Author: glen                         Date: Tue Apr 29 16:58:57 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use rpm macros for /etc/shells edit; rel 49

---- Files affected:
SPECS:
   pdksh.spec (1.116 -> 1.117) 

---- Diffs:

================================================================
Index: SPECS/pdksh.spec
diff -u SPECS/pdksh.spec:1.116 SPECS/pdksh.spec:1.117
--- SPECS/pdksh.spec:1.116      Tue Oct 16 04:12:14 2007
+++ SPECS/pdksh.spec    Tue Apr 29 18:58:52 2008
@@ -14,7 +14,7 @@
 Summary(uk.UTF-8):     Вілбна реалізація командного процесора Korn shell (ksh)
 Name:          pdksh
 Version:       5.2.14
-Release:       48
+Release:       49
 License:       Mostly Public Domain with Free & GPL additions
 Group:         Applications/Shells
 Source0:       ftp://ftp.cs.mun.ca/pub/pdksh/%{name}-%{version}.tar.gz
@@ -35,6 +35,7 @@
 Patch16:       %{name}-unset.patch
 URL:           http://www.cs.mun.ca/~michael/pdksh/
 %{?with_static:BuildRequires:  glibc-static}
+BuildRequires: rpmbuild(macros) >= 1.429
 # is needed for /etc directory existence
 Requires(pre): FHS
 Requires:      setup >= 2.4.6-2
@@ -148,64 +149,16 @@
 
 ln -sf ksh $RPM_BUILD_ROOT/bin/sh
 
-install        %{SOURCE2} $RPM_BUILD_ROOT/etc/kshrc
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/kshrc
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post -p <lua>
-t = {}
-f = io.open("/etc/shells", "r")
-if f then
-       for l in f:lines() do t[l]=l; end
-       f:close()
-end
-for _, s in ipairs({"/bin/ksh", "/bin/sh"}) do
-       if not t[s] then
-               f = io.open("/etc/shells", "a"); f:write(s.."\n"); f:close()
-       end
-end
-
-%preun -p <lua>
-if arg[2] == "0" then
-       f = io.open("/etc/shells", "r")
-       if f then
-               s=""
-               for l in f:lines() do
-                       if not string.match(l,"^/bin/k?sh$") then
-                               s=s..l.."\n"
-                       end
-               end
-               f:close()
-               io.open("/etc/shells", "w"):write(s)
-       end
-end
-
-%post static -p <lua>
-t = {}
-f = io.open("/etc/shells", "r")
-if f then
-       for l in f:lines() do t[l]=l; end
-       f:close()
-end
-if not t["/bin/ksh.static"] then
-       f = io.open("/etc/shells", "a"); f:write("/bin/ksh.static\n"); f:close()
-end
-
-%preun static -p <lua>
-if arg[1] == "2" then
-       f = io.open("/etc/shells", "r")
-       if f then
-               s=""
-               for l in f:lines() do
-                       if not string.match(l,"^/bin/ksh\.static$") then
-                               s=s..l.."\n"
-                       end
-               end
-               f:close()
-               io.open("/etc/shells", "w"):write(s)
-       end
-end
+%post  -p %add_etc_shells -p /bin/sh /bin/ksh
+%preun -p %remove_etc_shells -p /bin/sh /bin/ksh
+
+%post static -p %add_etc_shells -p /bin/ksh.static
+%preun static -p %remove_etc_shells -p /bin/ksh.static
 
 %files
 %defattr(644,root,root,755)
@@ -228,6 +181,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.117  2008-04-29 16:58:52  glen
+- use rpm macros for /etc/shells edit; rel 49
+
 Revision 1.116  2007-10-16 02:12:14  glen
 - tabs in lua scriptlets
 
@@ -576,48 +532,3 @@
 
 Revision 1.19  1999/07/12 23:06:12  kloczek
 - added using CVS keywords in %changelog (for automating them).
-
-* Sat Jun  5 1999 Jan Rękorajski <[EMAIL PROTECTED]>
-  [5.2.13.9-4]
-- added static subpackage
-
-* Sat May 29 1999 Tomasz Kłoczko <[EMAIL PROTECTED]>
-  [5.2.13.9-2]
-- more rpm macros,
-- added pl man page for ksh(1).
-
-* Sun May  9 1999 Tomasz Kłoczko <[EMAIL PROTECTED]>
-  [5.2.13.9-1]
-- now package is FHS 2.0 compliant.
-
-* Sun May  2 1999 Tomasz Kłoczko <[EMAIL PROTECTED]>
-  [5.2.13.8-1]
-- fixed memory allocation bug by Marcin Danecki (pdksh-alloc.patch).
-
-* Fri Mar  5 1999 Tomasz Kłoczko <[EMAIL PROTECTED]>
-  [5.2.13.7-2]
-- added symlink ksh -> /bin/sh.
-
-* Wed Feb 24 1999 Tomasz Kłoczko <[EMAIL PROTECTED]>
-  [5.2.13.7-1]
-- removed man group from man pages,
-- added --enable-emacs, --enable-vi to configure parameters,
-- added LDFLAGS="-s" to configure environment,
-- removed %{_bindir}/* symlinks,
-- added gzipping man pages,
-- added bzipping2 %doc,
-- added URL,
-- added Group(pl),
-- simplified %post, %postun.
-
-* Wed Oct 07 1998 Wojtek Ślusarczyk <[EMAIL PROTECTED]>
-  [5.2.12-3d]
-- translation modified for pl,
-- build from non root's account,
-- major changes of the spec file
-  (PLD spec file standard).
-
-* Thu Jul 23 1998 Wojtek Ślusarczyk <[EMAIL PROTECTED]>
-  [5.2.12-3]
-- build agains glibc-2.1,
-- start at RH spec file.
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/pdksh.spec?r1=1.116&r2=1.117&f=u

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

Reply via email to