Hi,
I followed the instructions in
http://www.linuxquestions.org/questi...c-file-648210/
but i still have a problem am I doing it correctly? is the program running?
the spec-file: its a tar.gz file so i used %setup instead of %prep
i also changed %attr(755,root,root) /usr/local/bin/%{name} to %attr(755,root,root) /usr/local/bin/
Code:
Name: zisagent
Version: _5.3.32124_setup_unix.r_2011.06.15
Release: 1
Summary: %{name} is zisagent
Group: Utilities/System # See /usr/share/docs/rpm-*/GROUPS
License: Comercial
Source: $RPM_SOURCE_DIR/%{name}-%{version}.%{release}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}.%{release}
Provides: %{name}
%description
This package contains a "zis agent" example binary.
# or %setup if a tarball
#%prep # This preps dir $RPM_BUILD_DIR/%{name}-%{version}.%{release}/.
#%setup -n $RPM_BUILD_DIR/%{name}-%{version}.%{release}
%setup -n $RPM_BUILD_DIR/%{name}-%{version}.%{release}
# We're in the BuildRoot now. Make certain:
#cd $RPM_BUILD_DIR/%{name}-%{version}.%{release}/
# Copy files in that aren't packaged:
#cp $RPM_SOURCE_DIR/%{name}.c .
#%build
#gcc -o %{name} %{name}.c
%install
cd $RPM_BUILD_DIR/%{name}-%{version}.%{release}/
# Create dirs leading up to if necessary:
#[ -d /usr/local/bin ] ||
mkdir -p $RPM_BUILD_ROOT/usr/local/bin
install -m 0755 ./install.sh $RPM_BUILD_ROOT/usr/local/bin
%clean
[ "$RPM_BUILD_ROOT" = "%{_tmppath}/%{name}-%{version}" ] && rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%attr(755,root,root) /usr/local/bin/
%changelog
* Wed Nov 10 2011 %{packager}
- Initialise .spec file for %{name}-%{ver}.
after using rpmbuild -ba SPECS/zisagent.spec
i got an rpm package but its only 2.6 Kib
also in the $RPM_BUILD_ROOT/usr/local/bin there was only install.sh
and the install.sh file is
Code:
#!/bin/sh
MY_PATH=`dirname "$0"`
ZISAGENT_PATH=`cd "${MY_PATH}" && pwd -P` || exit 3
DO_SETUID=0
if [ -u "${ZISAGENT_PATH}/start.sh" ]; then
DO_SETUID=1
fi
if [ -f "${ZISAGENT_PATH}/lib/commands.sh" ]; then
ls -l "${ZISAGENT_PATH}/start.sh" > "${ZISAGENT_PATH}/tmp/owner.txt"
"${ZISAGENT_PATH}/stop.sh" || exit 2
fi
FIND_SH_SCRIPT=${ZISAGENT_PATH}/bin/find-sh.sh
SH_FILE=${ZISAGENT_PATH}/lib/shell.sh
MAIN_CFG_SCRIPT=${ZISAGENT_PATH}/bin/sh-cfg.sh
UPDATE_SCRIPT=${ZISAGENT_PATH}/update.sh
"${FIND_SH_SCRIPT}" "${ZISAGENT_PATH}" || exit 2
. "${SH_FILE}"
cp -f "${ZISAGENT_PATH}/zisagent.sh.tmpl" "${ZISAGENT_PATH}/zisagent.sh"
"${SHELL}" "${MAIN_CFG_SCRIPT}" "${ZISAGENT_PATH}" || exit 2
"${SHELL}" "${UPDATE_SCRIPT}" || exit 2
if [ ${DO_SETUID} -ne 0 ]; then
"${SHELL}" "${ZISAGENT_PATH}/bin/setuid.sh" "${ZISAGENT_PATH}"
fi
"${SHELL}" "${ZISAGENT_PATH}/config.sh" $1 || exit 2
exit 0
now i tried the following i installed the software on a different directory and copied all the files to $RPM_BUILD_ROOT/usr/local/bin
and the result of using rpmbuild -ba SPECS/zisagent.spec is a 1.4 MiB file
now i installed the rpm package (rpm -i {package-name}) it installed a 12 MiB program. now how do i make sure this is correct and how to run the program, i mean how do i find it? its not under utilities or system or other directory!