]> git.ipfire.org Git - pakfire.git/commitdiff
Create path variables.
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 21 Dec 2011 21:36:39 +0000 (22:36 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 21 Dec 2011 21:36:39 +0000 (22:36 +0100)
As the new x86_64 architecture places libs in lib64 instead of lib
we need to define it somewhere.
To change other paths in the future, we use a lot of variables
for them that have been introduced here.

(Also fix libtool rpath fix - that never worked before.)

macros/arch.macro [new file with mode: 0644]
macros/build.macro
macros/constants.macro
macros/templates.macro

diff --git a/macros/arch.macro b/macros/arch.macro
new file mode 100644 (file)
index 0000000..e756b8e
--- /dev/null
@@ -0,0 +1,41 @@
+
+# Definitions for architectures.
+
+prefix            = /usr
+exec_prefix       = %{prefix}
+bindir            = %{exec_prefix}/bin
+sbindir           = %{exec_prefix}/sbin
+libexecdir        = %{exec_prefix}/lib
+datadir           = %{prefix}/share
+sysconfdir        = /etc
+sharedstatedir    = %{prefix}/com
+localstatedir     = /var
+lib               = lib
+libdir            = %{exec_prefix}/%{lib}
+includedir        = %{prefix}/include
+infodir           = %{datadir}/info
+mandir            = %{datadir}/man
+
+if "%{DISTRO_ARCH}" == "x86_64"
+       # Libs are installed in /lib64 and %{prefix}/lib64 on x86_64
+       lib = lib64
+end
+
+CONFIGURE_SCRIPT = configure
+configure_options = \
+       --host=%{DISTRO_MACHINE} \
+       --build=%{DISTRO_MACHINE} \
+       --prefix=%{prefix} \
+       --exec-prefix=%{exec_prefix} \
+       --bindir=%{bindir} \
+       --sbindir=%{sbindir} \
+       --sysconfdir=%{sysconfdir} \
+       --datadir=%{datadir} \
+       --includedir=%{includedir} \
+       --libdir=%{libdir} \
+       --libexecdir=%{libexecdir} \
+       --localstatedir=%{localstatedir} \
+       --sharedstatedir=%{sharedstatedir} \
+       --mandir=%{mandir} \
+       --infodir=%{infodir} \
+       --disable-dependency-tracking
index 61a42a035504d0ff4699bd051a49037587557e5a..5d6a003e8145f2b38c57e89d95536970d4ca757c 100644 (file)
@@ -99,7 +99,7 @@ build
                        ./%{CONFIGURE_SCRIPT} \
                                %{configure_options}
 
-                       ${MACRO_FIX_LIBTOOL}
+                       %{MACRO_FIX_LIBTOOL}
                fi
 
                # Run custom commands.
index aeab1eff5706b1402dbec40c897e067aa89d33b5..07459a39e3d104ec889a65f14b80baa29cfef91a 100644 (file)
@@ -9,12 +9,6 @@ DIR_SRC     = %{DIR_BUILD}/source
 DIR_TMP     = /tmp
 DIR_SOURCE  = %{BASEDIR}
 
-CONFIGURE_SCRIPT = configure
-configure_options = \
-       --host=%{DISTRO_MACHINE} \
-       --build=%{DISTRO_MACHINE} \
-       --prefix=/usr
-
 # By default, take all patches from the patches directory
 # in alphabetical order.
 patches = $(find %{DIR_PATCHES} -not -type d 2>/dev/null | sort)
@@ -28,9 +22,9 @@ MACRO_EXTRACT = tar xaf
 
 # Remove rpath from libtool.
 MACRO_FIX_LIBTOOL
-       if [ -e "%{DIR_APP}/libtool" ]; then
-               sed -e %{DIR_APP}/libtool \
-                       -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g'
+       if [ -e "libtool" ]; then
+               sed -libtool \
+                       -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
                        -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g'
        fi
 end
index 8fb502d98710cbf5dd2ff67be0a39a353b17cf6b..05eeb5370be55595d7d35fe5cd960a04ff446e63 100644 (file)
@@ -21,8 +21,8 @@ packages
                description = Runtime library files of the package %{thisapp}.
 
                def files
-                       /lib/lib*.so.*
-                       /usr/lib*/lib*.so.*
+                       /%{lib}/*.so.*
+                       ${libdir}/lib*.so.*
                end
 
                def configfiles
@@ -38,17 +38,17 @@ packages
                requires = %{name}=%{thisver}
 
                def files
-                       /usr/bin/*-config
-                       /usr/include
-                       /usr/lib/*.a
-                       /usr/lib/pkgconfig
-                       /usr/share/aclocal
-                       /usr/lib/*.so
-                       /usr/share/*/cmake
-                       /usr/share/man/man2
-                       /usr/share/man/man3
-                       /usr/share/pkgconfig
-                       /usr/share/vala
+                       %{bindir}/*-config
+                       %{includedir}
+                       %{libdir}//*.a
+                       %{libdir}/pkgconfig
+                       %{datadir}/aclocal
+                       %{libdir}/*.so
+                       %{datadir}/*/cmake
+                       %{mandir}/man2
+                       %{mandir}/man3
+                       %{datadir}/pkgconfig
+                       %{datadir}/vala
                end
 
                def configfiles