[projects/template-specs] more different packaging styles

glen glen at pld-linux.org
Thu Nov 15 23:31:41 CET 2012


commit 439a84a7dc9e7d3c075fac11a52354b5df956241
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Fri Nov 16 00:31:04 2012 +0200

    more different packaging styles

 nodejs-package.spec | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/nodejs-package.spec b/nodejs-package.spec
index ea5b5c8..903574f 100644
--- a/nodejs-package.spec
+++ b/nodejs-package.spec
@@ -27,8 +27,10 @@ chmod a+rx bin/*
 rm -rf $RPM_BUILD_ROOT
 
 install -d $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
-cp -pr index.js package.json $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
+cp -p %{pkg}.js package.json $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
 cp -pr lib package.json $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
+cp -pr index.js package.json $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
+cp -pr index.js package.json lib $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
 
 # bin scripts in $PATH should be symlinks, so relative resolving in scripts
 # themselves could work
@@ -48,4 +50,13 @@ rm -rf $RPM_BUILD_ROOT
 %doc README.md
 %doc README.md LICENSE
 %{nodejs_libdir}/%{pkg}
+
+# for package with bin/ dir, need to preserve permissions
+%dir %{nodejs_libdir}/%{pkg}
+%{nodejs_libdir}/%{pkg}/package.json
+%{nodejs_libdir}/%{pkg}/%{pkg}.js
+%dir %{nodejs_libdir}/%{pkg}/bin
+%attr(755,root,root) %{nodejs_libdir}/%{pkg}/bin/*
+
 %{_examplesdir}/%{name}-%{version}
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/template-specs.git/commitdiff/2c0f2034cbdf87871120791f0dc0f79af989d10b



More information about the pld-cvs-commit mailing list