From: Martin Vidner Date: Wed, 25 Oct 2006 06:24:30 +0000 (+0000) Subject: Added files necessary for a RPM. X-Git-Tag: BASE-SuSE-SLE-10-SP2-Branch~97 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=63224eeb748d543c88cb2ef91657b2d87a61d48f;p=platform%2Fupstream%2Fzypper.git Added files necessary for a RPM. --- diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..6790202 --- /dev/null +++ b/COPYING @@ -0,0 +1,21 @@ +/*---------------------------------------------------------------------\ +| ____ _ __ __ ___ | +| |__ / \ / / . \ . \ | +| / / \ V /| _/ _/ | +| / /__ | | | | | | | +| /_____||_| |_| |_| | +| | +\---------------------------------------------------------------------*/ + +Copyright (C) 2000-2002 Ximian, Inc. +Copyright (C) 2005 SUSE Linux Products GmbH + +ZYpp is licensed under the GNU General Public License version 2 +or later. The text of the GNU General Public License can be viewed at +http://www.gnu.org/licenses/gpl.html + +As a special exception, you have permission to link this program +with the following libraries and distribute executables, as long as you +follow the requirements of the GNU GPL in regard to all of the +software in the executable aside from the following libraries: +- OpenSSL (http://www.openssl.org) diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..311f1a2 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,33 @@ +## Process this file with automake to produce Makefile.in +## ################################################## + +# Do NOT list 'devel' in subdirs. It's developers playgound +# and must not prevent anything from building. + +SUBDIRS = src + +## ################################################## + +#ACLOCAL_AMFLAGS = -I m4 +ACLOCAL_AMFLAGS = + +## ################################################## + +.PHONY: package package-local check-up-to-date + +package: check-up-to-date package-local + +package-local: dist-bzip2 @PACKAGE@.spec + @if [ `bunzip2 -c $(distdir).tar.bz2 | wc --bytes` = 0 ] ; then \ + echo "Error: $(distdir).tar.bz2 is empty" ; \ + exit 1 ; \ + fi + rm -f package/*.tar.bz2 + rm -f package/*~ + rm -f package/*.bak + rm -f package/*.auto + mv $(distdir).tar.bz2 package/ + mv @PACKAGE@.spec package/ + +check-up-to-date: + cd $(srcdir) && ! LC_ALL=C svn status --show-updates --quiet | grep -v '^Status against revision' diff --git a/Makefile.cvs b/Makefile.cvs new file mode 100644 index 0000000..39f9d34 --- /dev/null +++ b/Makefile.cvs @@ -0,0 +1,31 @@ +## ################################################## +## Makefile.cvs +## ################################################## + +.PHONY: default init configure reconf + +# Try to detect if this is a lib or lib64 system +LIB = $(shell gcc -v 2>&1 \ + | awk ' BEGIN{ lib="lib" } \ + match( $$0, "--libdir=/usr/([^ ]*)" ) { \ + lib=substr($$0,RSTART,RLENGTH); \ + sub("--libdir=/usr/","",lib) \ + } \ + END{print lib} ' ) + +PREFIX = /usr +CONFIGURE_OPTS= +default: configure + +configure: init + ./configure --prefix=$(PREFIX) --libdir=$(PREFIX)/$(LIB) \ + --disable-static \ + $(CONFIGURE_OPTS) + +init: + rm -rf autom4te.cache + autoreconf --force --install --symlink --verbose + +reconf: init + ./config.status --recheck + ./config.status diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..958d72a --- /dev/null +++ b/VERSION @@ -0,0 +1,10 @@ +dnl ================================================== +dnl Versioning +dnl ========== +dnl +dnl +dnl ================================================== +m4_define([ZYPPER_MAJOR], [0]) +m4_define([ZYPPER_MINOR], [5]) +m4_define([ZYPPER_PATCH], [0]) +dnl ================================================== diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..895bf42 --- /dev/null +++ b/configure.ac @@ -0,0 +1,124 @@ +dnl Process this file with autoconf to produce a configure script. +dnl ================================================== +m4_include([VERSION]) +dnl AC_INIT(name, version) +AC_INIT([zypper], [ZYPPER_MAJOR.ZYPPER_MINOR.ZYPPER_PATCH]) +dnl ================================================== +AC_CONFIG_SRCDIR(src/Makefile.am) + +AC_PREFIX_DEFAULT(/usr) +AC_CANONICAL_TARGET +dnl enable renaming the resulting program +AC_ARG_PROGRAM + +AM_INIT_AUTOMAKE(foreign dist-bzip2 no-dist-gzip tar-ustar) +AM_CONFIG_HEADER(config.h) + +dnl ================================================== + +docdir=\${datadir}/doc/packages +pkgdocdir=\${docdir}/$PACKAGE + +AC_SUBST(docdir) +AC_SUBST(pkgdocdir) + +localedir=${prefix}/share/locale + +AC_SUBST(localedir) + +AH_TEMPLATE([LOCALEDIR],[gettext localedir]) +AC_DEFINE_UNQUOTED([LOCALEDIR], ["${localedir}"]) +AH_TEMPLATE([TEXTDOMAIN],[gettext textdomain]) +AC_DEFINE_UNQUOTED([TEXTDOMAIN], ["$PACKAGE"]) + +dnl ================================================== +dnl checks for programs + +dnl check for c++ compiler and tools +AC_PROG_CXX +AC_PROG_CXX +AC_PROG_CXXCPP +AC_PROG_INSTALL +AM_PROG_LIBTOOL + +dnl do AC_CHECK_* tests using c++ (e.g. boost header) +AC_LANG([C++]) + +AC_PATH_PROG(XGETTEXT, xgettext) +if test -z "$XGETTEXT" ; then + AC_MSG_ERROR(xgettext is missing; please install gettext-devel.) +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]) + +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 + +dnl ================================================== +dnl checks for typedefs +dnl ================================================== +dnl checks for structures +dnl ================================================== +dnl checks for compiler characteristics +dnl ================================================== +dnl checks for library functions +dnl ================================================== +dnl checks for system services +dnl ================================================== +dnl AC_CONFIG_FILES([FILE...]) +AC_OUTPUT( + Makefile \ + libzypp.spec \ + libzypp.pc \ + src/Makefile \ + po/Makefile.in +) +dnl ================================================== + +echo " +Configuration: + + PACKAGE: ${PACKAGE} + VERSION: ${VERSION} + + COMPILER: ${CXX} + CXXFLAGS: ${CXXFLAGS} + + PREFIX: ${prefix} + LIBDIR: ${libdir} + +" +echo + diff --git a/zypper.spec.in b/zypper.spec.in new file mode 100644 index 0000000..fd9de7b --- /dev/null +++ b/zypper.spec.in @@ -0,0 +1,84 @@ +# +# spec file for package zypper +# +# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + +Name: @PACKAGE@ +# da library +BuildRequires: libzypp +BuildRequires: boost-devel gcc-c++ libxml2-devel gettext-devel +License: GPL +Group: System/Packages +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Autoreqprov: on +PreReq: permissions +Summary: Command Line Package Management Using Libzypp +Version: @VERSION@ +Release: 0 +Source: @PACKAGE@-@VERSION@.tar.bz2 +Prefix: /usr +# RIP +Provides: y2pmsh +Obsoletes: y2pmsh + +%description +Command Line Package Management Using Libzypp + +Authors: +-------- + Jan Kupec + Duncan Mac-Vicar + Martin Vidner + +%prep +%setup -q + +%build +cp /usr/share/gettext/config.rpath . +gettextize -f +autoreconf --force --install --symlink --verbose +%{?suse_update_config:%{suse_update_config -f}} +CXXFLAGS="$RPM_OPT_FLAGS" \ +./configure --prefix=%{prefix} --libdir=%{_libdir} --mandir=%{_mandir} --disable-static +make %{?jobs:-j %jobs} +#make check + +%install +make install DESTDIR=$RPM_BUILD_ROOT +# Create filelist with translatins +%{find_lang} zypper + +%post +%run_ldconfig +%run_permissions + +%verifyscript +%verify_permissions -e %{_sbindir}/zypp-checkpatches-wrapper + +%postun +%run_ldconfig + +%clean + +%files -f zypp.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