]> git.pld-linux.org Git - packages/dml.git/blobdiff - dml.spec
- %desc
[packages/dml.git] / dml.spec
index 7fc60889b00ba00259f06c538f4b43f6140cb0b5..88b03117b3342aceb6dbf971d4217996cb5828b4 100644 (file)
--- a/dml.spec
+++ b/dml.spec
@@ -1,8 +1,9 @@
+# _without_embed - don't build uClibc version
 Summary:       Tool for displaying dialogs from shell
 Summary(pl):   Narzêdzie do wy¶wietlania okien dialogowych z shella
 Name:          dml
 Version:       0.0.14
-Release:       2
+Release:       3
 License:       GPL
 Group:         Applications/Terminal
 Group(de):     Applikationen/Terminal
@@ -10,50 +11,63 @@ Group(pl):  Aplikacje/Terminal
 Source0:       ftp://ftp.pld.org.pl/people/malekith/%{name}-%{version}.tar.gz
 BuildRequires: autoconf
 BuildRequires: automake
-%if %{?BOOT:1}%{!?BOOT:0}
-BuildRequires: slang-devel-BOOT
-BuildRequires: uClibc-devel-BOOT
+%if %{!?_without_embed:1}%{?_without_embed:0}
+BuildRequires: slang-devel-embed
+BuildRequires: uClibc-devel
+BuildRequires: uClibc-static
 %endif
 BuildRequires: slang-devel
 BuildRequires: gettext-devel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 Requires:      slang
 
+%define embed_path     /usr/lib/embed
+%define embed_cc       %{_arch}-uclibc-cc
+%define embed_cflags   %{rpmcflags} -Os
+%define uclibc_prefix  /usr/%{_arch}-linux-uclibc
+
 %description
 Tool for displaying dialogs from shell.
 
 %description -l pl
 Narzêdzie do wy¶wietlania okien dialogowych z shella.
 
-%package BOOT
+%package embed
 Summary:       Tool for displaying dialogs from shell - BOOT
 Summary(pl):   Narzêdzie do wy¶wietlania okien dialogowych z shella -BOOT
 Group:         Applications/Terminal
 Group(de):     Applikationen/Terminal
 Group(pl):     Aplikacje/Terminal
 
-%description BOOT
+%description embed
 Tool for displaying dialogs from shell. Bootdisk version.
 
+%description embed -l pl
+Narzêdzie do wy¶wietlania okien dialogowych z shella. Wersja na
+bootkietkê.
+
 %prep
 %setup -q
 
 %build
 autoheader
 aclocal
-autoconf 
+autoconf
 automake -a -c
 
-%if %{?BOOT:1}%{!?BOOT:0}
+%if %{!?_without_embed:1}%{?_without_embed:0}
 %configure --disable-nls
 %{__make} -C src \
-       CFLAGS="-m386 -I%{_libdir}/bootdisk%{_includedir}" \
-       LDFLAGS="-nostdlib -static -s" \
-       LDADD=" %{_libdir}/bootdisk%{_libdir}/libslang.a \
-               %{_libdir}/bootdisk%{_libdir}/crt0.o \
-               %{_libdir}/bootdisk%{_libdir}/libc.a -lgcc "
-mv -f src/dml dml-BOOT
-
+       CC=%{embed_cc} \
+       CFLAGS="%{embed_cflags}" \
+       LDADD="-lslang"
+mv -f src/dml dml-shared
+%{__make} -C src \
+       CC=%{embed_cc} \
+       CFLAGS="%{embed_cflags}" \
+       LDFLAGS="-static" \
+       LDADD="-lslang"
+mv -f src/dml dml-static
 %{__make} distclean
 %endif
 
@@ -63,11 +77,12 @@ mv -f src/dml dml-BOOT
 %install
 rm -rf $RPM_BUILD_ROOT
 %{__make} install \
-       DESTDIR=$RPM_BUILD_ROOT 
+       DESTDIR=$RPM_BUILD_ROOT
 
-%if %{?BOOT:1}%{!?BOOT:0}
-install -d $RPM_BUILD_ROOT/usr/lib/bootdisk/bin
-install dml-BOOT $RPM_BUILD_ROOT/usr/lib/bootdisk/bin/dml
+%if %{!?_without_embed:1}%{?_without_embed:0}
+install -d $RPM_BUILD_ROOT%{embed_path}/{shared,static}
+install dml-shared $RPM_BUILD_ROOT%{embed_path}/shared/dml
+install dml-static $RPM_BUILD_ROOT%{embed_path}/static/dml
 %endif
 
 gzip -9nf AUTHORS TODO NEWS README ChangeLog
@@ -81,8 +96,8 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/*
 %{_mandir}/man1/*
 
-%if %{?BOOT:1}%{!?BOOT:0}
-%files BOOT
+%if %{!?_without_embed:1}%{?_without_embed:0}
+%files embed
 %defattr(644,root,root,755)
-%attr(755,root,root) /usr/lib/bootdisk/bin/dml
+%attr(755,root,root) %{embed_path}/*/dml
 %endif
This page took 0.116364 seconds and 4 git commands to generate.