Home
|
Content
|
検索
|
Navigation
|
ツールボックス
|
Actions
|
他の言語
openSUSE
Get Software
Wiki
Build Software
User Directory
Features
News
Forums
Shop
Discover it
プロジェクト概要
参加のしかた
ドキュメント
交流
サポートデータベース
連絡先
サイトマップ
ツールボックス
リンク元
関連ページの更新状況
最近更新したページ
特別ページ
ログインまたはアカウント作成
本文
ノート
ソースを表示
履歴
ソースを表示
出典: openSUSE
SUSE Linuxビルドのチュートリアル
のソース
以下に示された理由により、ページの編集を行うことができません:
この操作は、
登録利用者
のグループに属する利用者のみが実行できます。
このページのソースを閲覧し、コピーすることができます:
==いくつかの例== 以下は模範的なパッケージグループとパッケージ特有の特徴の実例です。 Here are some realworld examples for different exemplary package groups and specific package features. === [[KDE Packages]] === BuildRequires: kdelibs3-devel update-desktop-files<br> Name: kvpnc License: GPL Group: Productivity/Networking/System Summary: GUI frontend for openswan and vpnc Version: 0.7.2 Release: 1 URL: http://home.gna.org/kvpnc/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: %name-%{version}.tar.bz2<br> %description The application can create configurations for various kinds of VPN connections. You should install also the "vpnc" or "openswan" package.<br> %prep # extract the source and go into the kvpnc-0.7.2 directory %setup -q # source the standard build enviroment as defined in kdelibs3 package . /etc/opt/kde3/common_options # replace the admin/ folder with the version from kdelibs3 (will work for sure with # current autoconf and automake) and create Makefile.in and configure script. update_admin --no-unsermake<br> %build # source the standard build enviroment as defined in kdelibs3 package . /etc/opt/kde3/common_options ./configure $configkde --disable-final # do compile with the number of jobs given to the --jobs parameter of the build script. make %{?jobs:-j%jobs}<br> %install iconv -f iso8859-1 -t utf-8 src/kvpnc.desktop > w && mv w src/kvpnc.desktop # install all files into the BuildRoot make DESTDIR=$RPM_BUILD_ROOT install rm -rf $RPM_BUILD_ROOT/opt/kde3/share/doc/HTML/kvpnc # updates the .desktop file. It applys additional translations and Categories for a # proper position in the KDE menu %suse_update_desktop_file %name System Network # does find all localisation files and adds proper database attributes to them %find_lang %name<br> %clean # clean up the hard disc after build rm -rf $RPM_BUILD_ROOT<br> %files -f %name.lang %defattr(-,root,root) %dir /opt/kde3/share/icons/hicolor/16x16/apps %dir /opt/kde3/share/icons/hicolor/32x32/apps /opt/kde3/bin/kvpnc /opt/kde3/share/appl*/*/kvpnc.desktop /opt/kde3/share/apps/kvpnc /opt/kde3/share/icons/*/*/*/kvpnc*.png === [[Gnome Packages]] === # the following line is not a remark, but contains a macro for all # needed packages for a standard Gnome application: # neededforbuild gnome2-devel-packages<br> Name: gwget %define prefix /opt/gnome %define sysconfdir /etc%{prefix} License: GPL Group: Productivity/Networking/Web/Utilities Requires: wget Version: 0.95 Release: 1 Summary: Front-end for wget written in GTK+ URL: http://gnome.org/projects/gwget/ # the packages filesystem and gconf2 needs to be installed, before this # package gets installed. Otherwise the script in %post would fail. PreReq: filesystem gconf2 Source: %{name}-%{version}.tar.bz2 Source: %name.desktop BuildRoot: %{_tmppath}/%{name}-%{version}-build<br> %description Front-end for wget written in GTK+<br> # extract source tar ball %prep %setup -n %{_name}-%{version}<br> %build # use global compile flags and run configure script CFLAGS="$RPM_OPT_FLAGS" \ ./configure \ --prefix=%prefix \ --libexecdir=%prefix/lib/gwget \ --libdir=%prefix/%_lib \ --sysconfdir=%sysconfdir \ --datadir=%prefix/share \ --localstatedir=/var/lib \ --mandir=%{_mandir} \ --disable-schemas-install # do compile make<br> %install # install all files make DESTDIR=$RPM_BUILD_ROOT install # create file list of localized files into file %name.lang %find_lang %{name} # install the gwget.desktop file from %Source1 and apply Catgories (Network and FileTransfer) %suse_update_desktop_file -i gwget Network FileTransfer<br> # the calls which does get called after installing this package %post # update the gconf database export GCONF_CONFIG_SOURCE=`opt/gnome/bin/gconftool-2 --get-default-source` opt/gnome/bin/gconftool-2 --makefile-install-rule etc/opt/gnome/gconf/schemas/gwget.schemas >/dev/null<br> %clean # clean up the hard disc after build rm -rf $RPM_BUILD_ROOT<br> %files -f %{name}.lang %defattr(-,root,root) # the files to package === [[Perl Packages]] === Perl のパッケージはとても簡単でパッケージに似ています(訳注:意味不明)。というのも、それらのパッケージはほとんど、CPAN アーカイブのためにすでに作成されているからです。 Perl packages are quite easy and similar to package because they are almost already prepared for the CPAN archive. Name: perl-Curses Version: 1.12 Release: 1 # define the name from CPAN %define cpan_name Curses # do this package was known as "perl_cur" in old times. So we do need to Provide and Obsolete # this package. YaST will install this package during update instead of the old one in this way. Provides: %cpan_name # we better require the exact perl version, which was used to create this package Requires: perl = %{perl_version} Group: Development/Libraries/Perl License: Artistic License, Other License(s), see package URL: http://cpan.org/modules/by-module/Curses/ Summary: A Dynamic Loadable Curses Module for Perl5 Source: %cpan_name-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build<br> %description This is a dynamic loadable curses module for Perl5. This package can be found at any CPAN archive.<br> %prep %setup -q -n %cpan_name-%{version}<br> %build perl Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS -Wall" make make test<br> %install make DESTDIR=$RPM_BUILD_ROOT install_vendor %perl_process_packlist<br> %clean # clean up the hard disc after build rm -rf $RPM_BUILD_ROOT<br> %files %defattr(-,root,root) %doc Artistic Copying README %doc %{_mandir}/man3/* %{perl_vendorarch}/%cpan_name.pm %{perl_vendorarch}/auto/%cpan_name /var/adm/perl-modules/%{name} -------------------------------------------------------------------------------
SUSE Linuxビルドのチュートリアル
に戻る。