Hello Rony, Sure, I can give you some pointers on RPM packaging. I've been doing that daily for the last decade :)
A good place to start is this neat little series of articles from IBM DeveloperWorks: http://www.ibm.com/developerworks/linux/library/l-rpm1/index.html I also have a little 30-odd page basic RPM packaging tutorial I wrote for a customer, I could maybe turn it into an article if you're interested. After you cut your teeth on the basics, SUSE's Build Service is a very good resource on learning good practices. I usually say their checks are so damn pedantic you'll come out hating the thing and being eternally grateful to it at the end... :P http://build.opensuse.org It's free to use. You can inspect, clone any of the packages available and tinker with them under your home directory. Here are some Build Service guidelines from the SUSE community: https://en.opensuse.org/openSUSE:Build_Service_Tutorial https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto About your specific questions: - RPM provides a set of macros that are common among distros. They should do the trick for some of your problems, like %{_libdir} which should resolve to "/usr/lib64" on 64-bit systems, and "/usr/lib" on 32-bit systems. %{_bindir} resolves to "/usr/bin" usually. Also, the preferred placement for binary data under Linux is "%{_datadir}/<program>", like "/usr/share/<program>. Check our approach to this problem on ooRexx.spec: https://build.opensuse.org/package/view_file/devel:languages:misc/ooRexx/ooRexx.spec?expand=1 The macros are defined in the /usr/lib/rpm/macros file. SUSE defines a few more useful macros to simplify some common tasks: https://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros - RPMBuild (the one who interprets the SPEC file) uses a "mirrored" approach when building a package. Basically, you have a "sandbox" where you must create the desired directory tree, and place the files here as you would on a real system, including symbolic links. It's called a "build root" ($RPM_BUILD_ROOT). This process falls under the %install tag. All the files which shall be included in the final package must be listed under the %files tag. Whenever you install this package on a system, RPM keeps track of which files are part of each package, and removes them automatically when you remove the package. So, no need to remove them manually. - RPM offers many script hooks for each phase of installation and uninstallation of the package: %pre, %post, %preun, %postun, etc. I hope I have been clear enough in the lines above. If you have any questions, just mail me. >>> "Rony G. Flatscher" <[email protected]> 23/06/15 12:13 >>> Hi Erico, On 23.06.2015 16:21, Erico Mendonca wrote: > Don't forget: > https://build.opensuse.org/package/show/home:PerryWerneck:pw3270/ooRexx > > and > > https://build.opensuse.org/package/show/devel:languages:misc/ooRexx > > Don't think it could be easily integrated with Jenkins, though. interesting, thank you very much for this pointer! One question, seeing that you have been active and so supportive for ooRexx packaging: what would be involved for someone who has no clues (like me) how packaging works, to learn exactly that: how to package for Suse (and maybe for other Linux-based systems)? Currently, I have ooRexx scripts that do the installation that work along the lines as follows: copy the files to "/opt/someDirName", determine the ooRexx bitness and symbolically link the appropriate shared library to "/usr/lib". In addition, if there are executables link them symbolically to "/usr/bin". Uninstalling via the Rexx installation script does the same in reverse order (remove the symbolic links and finally the '/opt/someDirName'. What would be needed to achieve the same using Suse's packaging scheme, is there some nutshell/cookbook description/tutorial for that. The reason why I am asking is the preparation of a DBus-ooRexx library for which such a Rexx installation script exists. However, it would be much nicer would it be possible to use the Suse (and maybe the other distro's) package manager to install, update and remove such a library. (Eventually doing the same for BSF4ooRexx would be another intent.) Would you have any pointers, hints? TIA, ---rony ------------------------------------------------------------------------------ Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o _______________________________________________ Oorexx-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/oorexx-devel ------------------------------------------------------------------------------ Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o _______________________________________________ Oorexx-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/oorexx-devel
