Sponsored Content
Top Forums Shell Programming and Scripting build rpm with SPEC file for packaging .jar and some .sh files.. Post 302617531 by cielle on Monday 2nd of April 2012 10:30:24 PM
Old 04-02-2012
build rpm with SPEC file for packaging .jar and some .sh files..

Good day people,

I have posted this under Linux' Red Hat session but no luck.
Hope can have some luck here with my problem.

Hereby wish to have your advise for below:

I have some .jar files, some script files (install.sh, action.sh) , and a libaes.so file. Basically, the .jar files compute the operation of my system and define the working directory for my system.

My current scenario:
i trigger install.sh to set up the my service with /etc/init.d and with command service xSystem start to start up my system.

service xSystem start will eventually trigger action.sh with passing parameter start to run the .jar file.

Now i intend package my system into rpm. I tried to write the SPEC file to build the rpm but i failed. Hope to have some guidance here.

Below is my SPEC file content:

Code:
# This is a spec file for xSystem

%define _topdir	 	/usr/src/redhat
%define name		xSystem
%define release		1
%define version 	1.0
%define buildroot %{_topdir}/%{name}-%{version}-root

BuildRoot:	%{buildroot}
Summary: 		GNU xSystem
License: 		GPL
Name: 			%{name}
Version: 		%{version}
Release: 		%{release}
Source: 		%{name}-%{version}.tar.gz
Prefix: 		/usr
Group: 			Applications/System

%description
xSystem's description is here.


%prep
%build
/%{name}/.install.sh

%files

I tar all my .jar, .sh, and .so files and place it under /usr/src/redhat/SOURCES and place my SPEC file under /usr/src/redhat/SPECS .. then i execute
rpmbuild xSystem.spec from the SPECS directory.

But unfortunately, i can't find any .rpm file after executing that command.
What i have missed out?

please advice again.. I have come across with reference on making rpm with spec files.. but most of the one i found is working on .c file.. and not really matching my scenario. I have run out of idea..

I appreciate for guidance given here.

Many thanks again.
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Help needed to build an RPM?

I use Fedora Core 6. ->Our application has a Binary file and few .SO files. So i would like to build an RPM FILE for this with .SPEC file. ->Even i need to set some Envirnoment variables. Can any one give me the steps to Build an RPM?(A bit more clearly please as I am very new to... (1 Reply)
Discussion started by: platso
1 Replies

2. Red Hat

RPM Packaging doubt!

Hi, I need to create an RPM package for my java application. Already build package for that application avail;able. I need to create binary RPM package for my java application. For that in spec file, do I need to write any script kind of thing to install my package. any one have idea... (1 Reply)
Discussion started by: ram.sj
1 Replies

3. Shell Programming and Scripting

Need help writing RPM .spec file

I'm new to this. This installer just installs PHP code so NOTHING needs to be built (do I still need to use the build and buildroot directories?). I would just like to create an installer (spec) that: 1) unpacks a tarball 2) moves the unpacked files to the installation target 3) runs a script... (2 Replies)
Discussion started by: stevenswj
2 Replies

4. SuSE

Rpm packaging on Suse Linux

Hi All, I am new to linux. Still I am asked to package a war file as an RPM package. That is an unusual RPM packaging(To me). If you guys could guide me, on how to do that, will be great. I have a war file inside a folder, that folder is inside a tar file as a SOURCE for RPM package.... (8 Replies)
Discussion started by: dirshah
8 Replies

5. Shell Programming and Scripting

Calling script from a RPM spec file

Hi, I want to execute a script "myscript.sh" in the %post part of a rpm spec file. Suppose the script is placed in /opt/path. Then simply calling like sh /opt/path/myscript.sh from %post part (of that spec file) will suffice? Or there is any other way? (0 Replies)
Discussion started by: saurabhkoar
0 Replies

6. Linux

rpm packaging issue for unixodbc driver manager

Hi All, I am trying to make rpm package for unixODBC driver manager 2.3.0 using below spec file. During rpmbuild i am getting the error. Can you pls advice how we can overcome this issue %define name unixODBC %define ver 2.3.0 %define prefix /usr %define sysconfdir /etc %define libdir... (2 Replies)
Discussion started by: kamauv234
2 Replies

7. Red Hat

RedHat version in rpm spec files

Hi In opensuse we have this nice version control variable I use much when designing rpm spec files: rpm --showrc | grep suse_version %if 0%{?suse_version} > 0 && 0%{?suse_version} < 1700 -14: suse_version 1140But I do not find anything close to this in rhel/centos The only way... (0 Replies)
Discussion started by: mortenb
0 Replies

8. Red Hat

RPM packaging a directory of files

Hi, I wonder if anyone can point me in the right direction I have a requirement to distribute a set of admin scripts that currently sit in an SVN repo by packaging them up in an RPM so that they can me unpacked to the correct location by simply installing the package .. e.g. 'yum install... (0 Replies)
Discussion started by: hcclnoodles
0 Replies

9. Shell Programming and Scripting

How to get CRC check sum of files in java EAR file without extracting .jar/.war files to disk.?

unzip -v gives CRC info of each file in a zip(in my case .EAR) file. # unzip -v my-application.ear Archive: my-application.ear Length Method Size Cmpr Date Time CRC-32 Name -------- ------ ------- ---- ---------- ----- -------- ---- 197981 Defl:N 183708 7%... (1 Reply)
Discussion started by: kchinnam
1 Replies
MAVEN(1)							   User Commands							  MAVEN(1)

NAME
Maven - Creates links in /usr/share/maven-repo for all jars. SYNOPSIS
mh_linkjars [option]... DESCRIPTION
Reads the file debian/$package.poms and create links for each jar file generated by a POM listed in the .poms file. OPTIONS
-h --help: show this text -V --version: show the version -p<package> --package=<package>: name of the Debian package which will contain the jar files -e<version>, --set-version=<version>: set the version for the jars, do not use the version declared in the POM file. -r<rules> --rules=<rules>: path to the file containing the rules to apply when cleaning the POM. Optional, the default location is debian/maven.rules -v --verbose: show more information while running -n --no-act: don't actually do anything, just print the results The <package>.poms file should contain the list of POM files associated with the list of jars to install in the repository, and each pom file should have either the option --usj-name, giving the name of the jar (without the extension) to link to and located in /usr/share/java, or the option --artifact, which should contain the full name of the source jar to link to. See also: mh_linkjar(1), mh_install(1) Maven Repo Helper version 1.7.1 January 2012 MAVEN(1)
All times are GMT -4. The time now is 01:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy