File steghide.spec of Package steghide
#
# spec file for package steghide
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: steghide
Summary: A steganography program
License: GPL-2.0+
Group: Productivity/Security
Version: 0.5.1
Release: 0
URL: http://steghide.sourceforge.net
Source: http://prdownloads.sourceforge.net/steghide/steghide-%{version}.tar.bz2
Patch0: steghide-%{version}.diff
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: dos2unix
BuildRequires: gcc-c++
BuildRequires: gettext-devel
BuildRequires: intltool
BuildRequires: libjpeg-devel
BuildRequires: libmcrypt-devel
BuildRequires: libtool
BuildRequires: mhash-devel
BuildRequires: pkgconfig
BuildRequires: sed
BuildRequires: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Steghide is a steganography program that is able to hide data in various kinds
of image- and audio-files. The color- respectivly sample-frequencies are not
changed thus making the embedding resistant against first-order statistical
tests. Features of steghide include compression and encryption of embedded data,
embedding of a checksum to verify the integrity of the extracted data and
support for jpeg, bmp, wav and au files.
%prep
%setup
%patch0 -p1
%build
cflags ()
{
local flag=$1; shift
local var=$1; shift
test -n "${flag}" -a -n "${var}" || return
case "${!var}" in
*${flag}*) return
esac
case "$flag" in
-Wl,*)
set -o noclobber
echo 'int main () { return 0; }' > ldtest.c
if ${CC:-gcc} -Werror $flag -o /dev/null -xc ldtest.c > /dev/null 2>&1 ; then
eval $var=\${$var:+\$$var\ }$flag
fi
set +o noclobber
rm -f ldtest.c
;;
*)
if ${CC:-gcc} -Werror $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
eval $var=\${$var:+\$$var\ }$flag
fi
if ${CXX:-g++} -Werror $flag -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1 ; then
eval $var=\${$var:+\$$var\ }$flag
fi
esac
}
CFLAGS="${RPM_OPT_FLAGS} -D_GNU_SOURCE"
LDFLAGS=
cflags -std=gnu89 CFLAGS
cflags -pipe CFLAGS
cflags -Wl,-O2 LDFLAGS
cflags -Wl,--hash-size=65521 LDFLAGS
CXXFLAGS="$CFLAGS"
export CFLAGS CXXFLAGS LDFLAGS
%configure --sharedstatedir=%{_localstatedir}/lib --disable-rpath --with-gnu-ld --with-libiconv-prefix=%{prefix} --with-libintl-prefix=%{prefix}
sed -ri '\@^CXXLINK@{ s@--mode=link@--tag=CXX --mode=link@; }' src/Makefile
make %{?_smp_mflags}
%install
mv LEAME LEAME.dos
dos2unix < LEAME.dos | iconv -f latin1 -t utf8 > LEAME
touch -r LEAME.dos LEAME
make install DESTDIR=%{buildroot} docdir='$(prefix)/share/doc/packages/$(PACKAGE)'
%find_lang %{name}
rm -vf %{buildroot}%{_datadir}/doc/packages/%{name}/INSTALL
%files -f %{name}.lang
%defattr(-,root,root)
%doc ABOUT-NLS BUGS COPYING CREDITS HISTORY README TODO
%{_bindir}/steghide
%doc %{_mandir}/man[1-9ln]/steghide.*
%doc %{_defaultdocdir}/%{name}/LEAME
%changelog