From: Martin Vidner Date: Wed, 25 Oct 2006 07:47:55 +0000 (+0000) Subject: Many fixes to make it actually build. X-Git-Tag: BASE-SuSE-SLE-10-SP2-Branch~95 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e0863322038222d2f7a180e5fb8318e04a7f15f7;p=platform%2Fupstream%2Fzypper.git Many fixes to make it actually build. Including gettextization. --- diff --git a/Makefile.am b/Makefile.am index 311f1a2..789601f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,12 +4,12 @@ # Do NOT list 'devel' in subdirs. It's developers playgound # and must not prevent anything from building. -SUBDIRS = src +SUBDIRS = src po ## ################################################## -#ACLOCAL_AMFLAGS = -I m4 -ACLOCAL_AMFLAGS = +ACLOCAL_AMFLAGS = -I m4 +EXTRA_DIST = config.rpath ## ################################################## @@ -31,3 +31,4 @@ package-local: dist-bzip2 @PACKAGE@.spec check-up-to-date: cd $(srcdir) && ! LC_ALL=C svn status --show-updates --quiet | grep -v '^Status against revision' + diff --git a/configure.ac b/configure.ac index 895bf42..86efb7f 100644 --- a/configure.ac +++ b/configure.ac @@ -34,6 +34,9 @@ AC_DEFINE_UNQUOTED([TEXTDOMAIN], ["$PACKAGE"]) dnl ================================================== dnl checks for programs +dnl invoked by AM_GNU_GETTEXT later. must be applied consistently. +AC_GNU_SOURCE + dnl check for c++ compiler and tools AC_PROG_CXX AC_PROG_CXX @@ -52,39 +55,17 @@ fi dnl ================================================== dnl checks for libraries -AC_CHECK_LIB([z], [gzopen], - [:], - AC_MSG_ERROR([libz not found. please install zlib-devel])) -AC_CHECK_LIB([xml2], [xmlNewTextReader], - [:], - AC_MSG_ERROR([libxml2 not found. please install libxml2-devel])) - -dnl ================================================== -PKG_CHECK_MODULES(ZYPP, [libzypp]) +AC_ARG_VAR([PKG_CONFIG_PATH], [where to search for pkg-config files]) +PKG_CHECK_MODULES(ZYPP, [libzypp >= 2.0.0]) dnl ================================================== dnl checks for header files AC_CHECK_HEADERS([boost/scoped_ptr.hpp], [], AC_MSG_ERROR([boost header not found. please install boost-devel])) -AC_CHECK_HEADERS([curl/curl.h], - [], - AC_MSG_ERROR([libcurl header not found. please install curl-devel.])) -AC_CHECK_HEADERS([idn-free.h], - [], - AC_MSG_ERROR([libidn header not found. please install libidn-devel.])) -AC_CHECK_HEADERS([openssl/evp.h], - [], - AC_MSG_ERROR([openssl header not found. please install openssl-devel.])) -AC_CHECK_HEADERS([rpm/rpmlib.h], - [], - AC_MSG_ERROR([rpmlib header not found. please install rpm-devel.])) -AC_CHECK_HEADERS([popt.h], - [], - AC_MSG_ERROR([popt header not found. please install popt-devel.])) dnl internationalization macros -AM_GNU_GETTEXT +AM_GNU_GETTEXT([external]) dnl ================================================== dnl checks for typedefs @@ -100,8 +81,7 @@ dnl ================================================== dnl AC_CONFIG_FILES([FILE...]) AC_OUTPUT( Makefile \ - libzypp.spec \ - libzypp.pc \ + zypper.spec \ src/Makefile \ po/Makefile.in ) diff --git a/package/zypper.changes b/package/zypper.changes new file mode 100644 index 0000000..721d42e --- /dev/null +++ b/package/zypper.changes @@ -0,0 +1,6 @@ +------------------------------------------------------------------- +Wed Oct 25 09:42:09 CEST 2006 - mvidner@suse.cz + +- Split the package from libzypp.rpm +- 0.5.0 + diff --git a/po/LINGUAS b/po/LINGUAS new file mode 100644 index 0000000..f73f570 --- /dev/null +++ b/po/LINGUAS @@ -0,0 +1,2 @@ +# Set of available languages. +cs diff --git a/po/Makevars b/po/Makevars new file mode 100644 index 0000000..f330ab6 --- /dev/null +++ b/po/Makevars @@ -0,0 +1,41 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = $(PACKAGE) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ + +# This is the copyright holder that gets inserted into the header of the +# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding +# package. (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.) Translators are +# expected to transfer the copyright for their translations to this person +# or entity, or to disclaim their copyright. The empty string stands for +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = SuSE Linux Products GmbH, Nuernberg + +# This is the email address or URL to which the translators shall report +# bugs in the untranslated strings: +# - Strings which are not entire sentences, see the maintainer guidelines +# in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +# understood. +# - Strings which make invalid assumptions about notation of date, time or +# money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = translation@suse.de + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used. It is usually empty. +EXTRA_LOCALE_CATEGORIES = diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..b4b4a77 --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1,2 @@ +# List of source files which contain translatable strings. +./src/zypper.cc diff --git a/po/cs.po b/po/cs.po new file mode 100644 index 0000000..95e6eb3 --- /dev/null +++ b/po/cs.po @@ -0,0 +1,35 @@ +# Czech translations for zypper package. +# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg +# This file is distributed under the same license as the zypper package. +# Martin Vidner , 2006. +# +msgid "" +msgstr "" +"Project-Id-Version: zypper 0.5.0\n" +"Report-Msgid-Bugs-To: translation@suse.de\n" +"POT-Creation-Date: 2006-10-25 09:26+0200\n" +"PO-Revision-Date: 2006-10-25 09:22+0200\n" +"Last-Translator: Martin Vidner \n" +"Language-Team: Czech \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#: src/zypper.cc:230 +msgid "" +" Commands:\n" +"\thelp\t\t\tHelp\n" +"\tinstall, in\t\tInstall packages or resolvables\n" +"\tremove, rm\t\tRemove packages or resolvables\n" +"\tsearch, se\t\tSearch for packages matching a pattern\n" +"\tservice-list, sl\tList services aka installation sources\n" +"\tservice-add, sa\t\tAdd a new service\n" +"\tservice-delete, sd\tDelete a service\n" +"\tservice-rename, sr\tRename a service\n" +"\tpatch-check, pchk\tCheck for patches\n" +"\tpatches, pch\t\tList patches\n" +"\tlist-updates, lu\tList updates\n" +"\tupdate, up\t\tUpdate packages\n" +"\tinfo, if\t\tShow full info for packages\n" +msgstr "" diff --git a/src/Makefile.am b/src/Makefile.am index 966a514..ad5ff22 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,13 +7,13 @@ noinst_PROGRAMS = zmart ## ################################################## -INCLUDES = -I$(top_srcdir)/tools/zmart -I$(oldincludedir)/libxml2 +AM_CPPFLAGS = $(ZYPP_CFLAGS) AM_LDFLAGS = AM_CXXFLAGS = # gperf: -pg -LDADD = -L$(top_srcdir)/zypp/.libs -lzypp -lboost_regex -lboost_program_options -lxml2 -lz +LDADD = $(ZYPP_LIBS) -lboost_regex -lboost_program_options ## ################################################## @@ -53,7 +53,7 @@ zypper_SOURCES = zypper.cc zmart-sources.cc zmart-misc.cc \ zypper-info.h \ zypper-info.cc \ zmart.h -zypper_LDADD = $(top_srcdir)/zypp/libzypp.la -lboost_regex +zypper_LDADD = $(ZYPP_LIBS) -lboost_regex zypp_checkpatches_SOURCES = zypp-checkpatches.cc zmart-sources.cc \ zypper-tabulator.h \ diff --git a/zypper.spec.in b/zypper.spec.in index fd9de7b..79ec860 100644 --- a/zypper.spec.in +++ b/zypper.spec.in @@ -12,8 +12,8 @@ Name: @PACKAGE@ # da library -BuildRequires: libzypp -BuildRequires: boost-devel gcc-c++ libxml2-devel gettext-devel +BuildRequires: libzypp-devel +BuildRequires: gcc-c++ pkg-config boost-devel gettext-devel License: GPL Group: System/Packages BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -41,7 +41,6 @@ Authors: %setup -q %build -cp /usr/share/gettext/config.rpath . gettextize -f autoreconf --force --install --symlink --verbose %{?suse_update_config:%{suse_update_config -f}} @@ -67,18 +66,8 @@ make install DESTDIR=$RPM_BUILD_ROOT %clean -%files -f zypp.lang +%files -f zypper.lang %defattr(-,root,root) %{_bindir}/zypper %{_sbindir}/zypp-checkpatches %verify(not mode) %attr (755,root,root) %{_sbindir}/zypp-checkpatches-wrapper - -%files devel -%defattr(-,root,root) -%dir %{_libdir}/libzypp.so -%dir %{_libdir}/libzypp.la -%dir %{_docdir}/zypp -%{_docdir}/zypp/* -%dir %{prefix}/include/zypp -%{prefix}/include/zypp/* -%{_libdir}/pkgconfig/libzypp.pc