rpm packaging issue for unixodbc driver manager


 
Thread Tools Search this Thread
Operating Systems Linux rpm packaging issue for unixodbc driver manager
# 1  
Old 08-29-2012
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

HTML Code:
%define name unixODBC
%define ver 2.3.0
%define prefix /usr
%define sysconfdir /etc
%define libdir /usr/lib64

Summary: ODBC driver manager
Name: %{name}
Version: %ver
Release: 1
License: LGPL and GPL
Group: Applications/Databases
Source: %{name}-%{ver}.tar.gz
BuildRoot: /var/tmp/%{name}-%{ver}-root
URL: http://www.unixodbc.org/
Docdir: %{prefix}/doc
Prefix: %prefix

%description
unixODBC aims to provide a complete ODBC solution for the Linux platform.
All programs are GPL.
All libs are LGPL (except nn which is GPL?).

%package devel
Summary: Includes and static libraries for ODBC development
Group: Development/Libraries
Requires: %{name} = %{ver}

%description devel
unixODBC aims to provide a complete ODBC solution for the Linux platform.
All programs are GPL.
All libs are LGPL (except nn which is GPL?).
This package contains the include files and static libraries
for development.

%package gui-qt
Summary: ODBC configurator, Data Source browser and ODBC test tool based on Qt
Group: Applications/Databases
Requires: %{name} = %{ver}

%description gui-qt
unixODBC aims to provide a complete ODBC solution for the Linux platform.
All programs are GPL.
All libs are LGPL (except nn which is GPL?).
This package contains two Qt based GUI programs for unixODBC:
ODBCConfig and DataManager

%prep
%setup

%ifarch alpha
ARCH_FLAGS="--host=alpha-redhat-linux"
%endif

export -n LANG LINGUAS LC_ALL
if [ -f configure ]; then
RPM_OPT_FLAGS="-DSIZEOF_LONG_INT=8"
CPPFLAGS="$RPM_OPT_FLAGS" ./configure $ARCH_FLAGS --prefix=%{prefix} --sysconfdir=%{sysconfdir} --libdir=%{libdir} --enable-gui=no --enable-drivers=no --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE
fi

%build
export -n LANG LINGUAS LC_ALL
if [ "$SMP" != "" ]; then
(make "MAKE=make -k -j $SMP"; exit 0)
make
else
make
fi

%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

make prefix=$RPM_BUILD_ROOT%{prefix} sysconfdir=$RPM_BUILD_ROOT%{sysconfdir} install-strip

%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

%pre
if [ -f %{sysconfdir}/odbc.ini ]; then
mv -f %{sysconfdir}/odbc.ini %{sysconfdir}/odbc.ini.rpmsave
fi
if [ -f %{sysconfdir}/odbcinst.ini ]; then
mv -f %{sysconfdir}/odbcinst.ini %{sysconfdir}/odbcinst.ini.rpmsave
fi

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%defattr(-, root, root)


%doc AUTHORS COPYING ChangeLog NEWS README doc

%{sysconfdir}/odbc.ini
%{sysconfdir}/odbcinst.ini
%{prefix}/bin/dltest
%{prefix}/bin/isql
%{prefix}/bin/iusql
%{prefix}/bin/odbcinst
%{prefix}/bin/odbc_config
%{libdir}/libodbc.so*
%{libdir}/libodbccr.so*
%{libdir}/libodbcinst.so*

%files devel
%defattr(-, root, root)

%{prefix}/include/*
%{libdir}/*.la

%files gui-qt
%defattr(-, root, root)

HTML Code:
Processing files: unixODBC-2.3.0-1
error: File not found by glob: /var/tmp/unixODBC-2.3.0-root/usr/lib64/libodbc.so*
error: File not found by glob: /var/tmp/unixODBC-2.3.0-root/usr/lib64/libodbccr.so*
error: File not found by glob: /var/tmp/unixODBC-2.3.0-root/usr/lib64/libodbcinst.so*
Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.91808
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd unixODBC-2.3.0
+ DOCDIR=/var/tmp/unixODBC-2.3.0-root/usr/doc/unixODBC-2.3.0
+ export DOCDIR
+ rm -rf /var/tmp/unixODBC-2.3.0-root/usr/doc/unixODBC-2.3.0
+ /bin/mkdir -p /var/tmp/unixODBC-2.3.0-root/usr/doc/unixODBC-2.3.0
+ cp -pr AUTHORS COPYING ChangeLog NEWS README doc /var/tmp/unixODBC-2.3.0-root/usr/doc/unixODBC-2.3.0
+ exit 0
Processing files: unixODBC-devel-2.3.0-1
error: File not found by glob: /var/tmp/unixODBC-2.3.0-root/usr/lib64/*.la
Processing files: unixODBC-gui-qt-2.3.0-1
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/unixODBC-2.3.0-root


RPM build errors:
    File not found by glob: /var/tmp/unixODBC-2.3.0-root/usr/lib64/libodbc.so*
    File not found by glob: /var/tmp/unixODBC-2.3.0-root/usr/lib64/libodbccr.so*
    File not found by glob: /var/tmp/unixODBC-2.3.0-root/usr/lib64/libodbcinst.so*
    File not found by glob: /var/tmp/unixODBC-2.3.0-root/usr/lib64/*.la

Regards
Kannan
# 2  
Old 08-31-2012
Are you sure the install directives are correct? Maybe change to something like the following to test installation:
Code:
%install
make DESTDIR=%buildroot install

This User Gave Thanks to fpmurphy For This Post:
# 3  
Old 09-03-2012
Thanks a lot for your help, working now .....

Regards
Kannan
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

How to change ODBC Driver Manager?

Hi Forum. I have been searching this information for a while but to no avail. I'm running the following command odbcinst -j on a Linux box and get the following: unixODBC 2.3.0 DRIVERS............: //opt/Progress/DataDirect/Connect64_for_ODBC_71/odbcinst.ini SYSTEM DATA SOURCES:... (2 Replies)
Discussion started by: pchang
2 Replies

2. UNIX for Advanced & Expert Users

Issue while creating RPM

I am trying to create an RPM that basically creates a JBOss container. At the end it copies folders and files in a particular directory structure. /root/rpmbuild/SOURCES # tree cac-1.0 cac-1.0 └── opt └── msdp └── ca └── iam_cac ... (1 Reply)
Discussion started by: Junaid Subhani
1 Replies

3. 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

4. AIX

Rpm issue with autoconf-2.63-1.AIX6.1.noarch.rpm

dears i am trying to install the autoconf-2.63-1.aix6.1.noarch.rpm but its shows the below error message . P700_dev/svn/dependencies>rpm -i autoconf-2.63-1.aix6.1.noarch.rpm error: failed dependencies: m4 is needed by autoconf-2.63-1 P700_dev/svn/dependencies> (6 Replies)
Discussion started by: thecobra151
6 Replies

5. Solaris

Packaging driver for NIC

Hi guys My friend needs nfo driver for his Solaris box. I installed that driver for myself from scratch and he needs that driver in SVR4 format. I downloaded source code and run make and this is the point I don't how to proceed. How can I recognize which needs go to the package ? Does make... (0 Replies)
Discussion started by: solaris_user
0 Replies

6. Shell Programming and Scripting

build rpm with SPEC file for packaging .jar and some .sh files..

Good day people, 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... (1 Reply)
Discussion started by: cielle
1 Replies

7. Red Hat

Trouble with installed / not installed rpm unixODBC/libodbc.so.1

Hey there, i run 1: on my server (RHEL 6) and getting response that the libodbc is not installed. If i use yum for installation, it tells me, there is no package like this ( 2: ). Since in the description of Definiens is mentioned that the Run-time dependency is unixODBC (libodbc.so.1), I assume... (2 Replies)
Discussion started by: rkirsten
2 Replies

8. 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

9. Shell Programming and Scripting

How to make RPM not write to RPM database if RPM fails to deploy?

How to make RPM not write to RPM database if RPM fails to deploy? IE I create an rpm spec file that contains the following if then exit 1 fi My rpm will fail at deployment, but if I do rpm -qa , I can see the rpm in the rpm db (3 Replies)
Discussion started by: 3junior
3 Replies

10. 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
Login or Register to Ask a Question