Просмотр исходного кода

- get the package really working by disabling Automake stuff - fix syntax by adding the missing colon at end of Source0 - %{l_ldflags} already contains -L%{l_prefix}/lib - use %{l_cppflags} for -I%{l_prefix}/include - remove trailing whitespaces

Ralf S. Engelschall 23 лет назад
Родитель
Сommit
fb888789f4
1 измененных файлов с 18 добавлено и 9 удалено
  1. 18 9
      libevent/libevent.spec

+ 18 - 9
libevent/libevent.spec

@@ -25,7 +25,7 @@
 
 #   package information
 Name:         libevent
-Summary:      An asynchronous Event Notification Library  
+Summary:      Asynchronous Event Notification Library
 URL:          http://monkey.org/~provos/libevent/
 Vendor:       Dug Song
 Packager:     The OpenPKG Project
@@ -36,28 +36,37 @@ Version:      0.6
 Release:      20030218
 
 #   list of sources
-Source0       http://monkey.org/~provos/libevent/libevent-%{version}.tar.gz
+Source0:      http://monkey.org/~provos/libevent/libevent-%{version}.tar.gz
 
 #   build information
 Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
-BuildPreReq:  OpenPKG, openpkg >= 20020211, make
+BuildPreReq:  OpenPKG, openpkg >= 20020211, gcc, make
 PreReq:       OpenPKG, openpkg >= 20020211
 AutoReq:      no
 AutoReqProv:  no
 
 %description
-     The libevent API provides a mechanism to execute a callback function 
-     when a specific event occurs on a file descriptor or after a timeout 
-     has been reached.
+    The libevent API provides a mechanism to execute a callback function
+    when a specific event occurs on a file descriptor or after a timeout
+    has been reached.
 
 %prep
     %setup -q
 
 %build
+    %{l_shtool} subst \
+        -e 's;\(ACLOCAL\)=.*;\1=true;' \
+        -e 's;\(AUTOCONF\)=.*;\1=true;' \
+        -e 's;\(AUTOMAKE\)=.*;\1=true;' \
+        -e 's;\(AUTOHEADER\)=.*;\1=true;' \
+        -e 's;\(MAKEINFO\)=.*;\1=true;' \
+        -e 's;\(AMTAR\)=.*;\1=true;' \
+        configure
     CC="%{l_cc}" \
-    LDFLAGS="%{l_ldflags} -L%{l_prefix}/lib" \
-    CFLAGS="%{l_cflags -O} -I%{l_prefix}/include/" \
+    CFLAGS="%{l_cflags -O}" \
+    CPPFLAGS="%{l_cppflags}" \
+    LDFLAGS="%{l_ldflags}" \
     ./configure \
         --prefix=%{l_prefix}
     %{l_make} %{l_mflags -O}
@@ -67,7 +76,7 @@ AutoReqProv:  no
     %{l_shtool} mkdir -p $RPM_BUILD_ROOT%{l_prefix}/man/man3
     %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
- 
+
 %files -f files
 
 %clean