checking gtkdbi into cvs
[gtkdbi.git] / gtkdbi.spec
1 %define ver     0.01
2 %define rel     1
3 %define name    gtkdbi
4 %define rlname  %{name}
5 %define source0 http://www.420.am/gtkdbi/%{name}-%{ver}.tar.gz
6 %define url     http://www.420.am/gtkdbi/
7 %define group   Application
8 %define copy    GPL or Artistic
9 %define filelst %{name}-%{ver}-files
10 %define confdir /etc
11 %define prefix  /usr
12 %define arch    noarch
13
14 Summary: No description
15
16 Name: %name
17 Version: %ver
18 Release: %rel
19 Copyright: %{copy}
20 Packager: Ivan Kohler <ivan-gtkdbi\@420.am>
21 Source: %{source0}
22 URL: %{url}
23 Group: %{group}
24 BuildArch: %{arch}
25 BuildRoot: /var/tmp/%{name}-%{ver}
26
27 %description
28 No description
29
30 %prep
31 %setup -n %{rlname}-%{ver}
32
33 %build
34 if [ $(perl -e 'print index($INC[0],"%{prefix}/lib/perl");') -eq 0 ];then
35     # package is to be installed in perl root
36     inst_method="makemaker-root"
37     CFLAGS=$RPM_OPT_FLAGS perl Makefile.PL PREFIX=%{prefix}
38 else
39     # package must go somewhere else (eg. /opt), so leave off the perl
40     # versioning to ease integration with automatic profile generation scripts
41     # if this is really a perl-version dependant package you should not omiss
42     # the version info...
43     inst_method="makemaker-site"
44     CFLAGS=$RPM_OPT_FLAGS perl Makefile.PL PREFIX=%{prefix} LIB=%{prefix}/lib/perl5
45 fi
46
47 echo $inst_method > inst_method
48
49 # get number of processors for parallel builds on SMP systems
50 numprocs=`cat /proc/cpuinfo | grep processor | wc | cut -c7`
51 if [ "x$numprocs" = "x" -o "x$numprocs" = "x0" ]; then
52   numprocs=1
53 fi
54
55 make "MAKE=make -j$numprocs"
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59
60 if [ "$(cat inst_method)" = "makemaker-root" ];then
61    make UNINST=1 PREFIX=$RPM_BUILD_ROOT%{prefix} install
62 elif [ "$(cat inst_method)" = "makemaker-site" ];then
63    make UNINST=1 PREFIX=$RPM_BUILD_ROOT%{prefix} LIB=$RPM_BUILD_ROOT%{prefix}/lib/perl5 install
64 fi
65
66 %__os_install_post
67 find $RPM_BUILD_ROOT -type f -print|sed -e "s@^$RPM_BUILD_ROOT@@g" > %{filelst}
68
69 %files -f %{filelst}
70 %defattr(-, root, root)
71 %doc Documentation/*
72
73 %clean
74 rm -rf $RPM_BUILD_ROOT
75
76 %changelog
77 * Tue Oct 23 2001 - Ivan Kohler <ivan-gtkdbi\@420.am>
78     This file was created by Glade::PerlSource