5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%define prefix /usr
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%define sysconfdir /etc
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%define version 1.0
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# official/beta release:
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#define release 1
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#define distrel %{version}
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# release candidate:
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%define release rc1
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%define distrel %{version}-%{release}
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%define serial 2002051501
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%define name idnkit
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%define distsrc %{name}-%{distrel}-src
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsName: %{name}
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsVersion: %{version}
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsRelease: %{release}
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCopyright: distributable
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsGroup: System Environment
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsSource: %{distsrc}.tar.gz
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsBuildRoot: /var/tmp/%{name}-root
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsSerial: %{serial}
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsSummary: Internationalized Domain Name kit (idnkit/JPNIC)
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsVendor: JPNIC
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsPackager: Japan Network Information Center
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%description
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsidnkit is a kit for handling Internationalized Domain Name.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%package devel
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsGroup: Development/Libraries
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsSummary: The development files for idnkit
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%description devel
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsThe header files and libraries (libidnkit.a and libidnkitlite.a)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsto develop applications that use the libraries.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%prep
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%setup -n %{distsrc}
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%build
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif [ -f /usr/lib/libiconv.a -o -f /usr/lib/libiconv.so ]
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsthen
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if [ -f /lib/libc-2.0* ]
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews ICONV="--with-iconv=yes"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews fi
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsfi
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCFLAGS="$RPM_OPT_FLAGS" ./configure \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --prefix=%{prefix} --sysconfdir=%{sysconfdir} \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --enable-runidn \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews $ICONV
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsmake
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%install
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsrm -fr $RPM_BUILD_ROOT
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsmake DESTDIR=$RPM_BUILD_ROOT install
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsmv $RPM_BUILD_ROOT/etc/idn.conf.sample $RPM_BUILD_ROOT/etc/idn.conf
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsmv $RPM_BUILD_ROOT/etc/idnalias.conf.sample $RPM_BUILD_ROOT/etc/idnalias.conf
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# devel kit
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#install -c lib/libidnkit.a $RPM_BUILD_ROOT/usr/lib
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#cp -r include/idn $RPM_BUILD_ROOT/usr/include
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# docs
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsmkdir rpm_docs
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews(cp NEWS INSTALL INSTALL.ja DISTFILES README.ja README LICENSE.txt \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews ChangeLog rpm_docs)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewscp -r patch rpm_docs
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%clean
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsrm -fr $RPM_BUILD_ROOT
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%files
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%defattr(-, root, root)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%{prefix}/bin/idnconv
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%{prefix}/bin/runidn
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%{prefix}/lib/libidnkit.so.*
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%{prefix}/lib/libidnkitlite.so.*
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%{prefix}/lib/libidnkitres.so.*
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%{prefix}/share/idnkit/*
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%config %{sysconfdir}/idn.conf
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%config %{sysconfdir}/idnalias.conf
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%attr(0644, root, root) %config(noreplace)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%attr(0644, root, man) %{prefix}/man/man1/*
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%attr(0644, root, man) %{prefix}/man/man3/*
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%attr(0644, root, man) %{prefix}/man/man5/*
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%doc rpm_docs/*
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%files devel
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%defattr(-, root, root)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%{prefix}/lib/libidnkit.a
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%{prefix}/lib/libidnkit.la
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%{prefix}/lib/libidnkit.so
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%{prefix}/lib/libidnkitlite.a
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%{prefix}/lib/libidnkitlite.la
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%{prefix}/lib/libidnkitlite.so
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%{prefix}/lib/libidnkitres.a
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%{prefix}/lib/libidnkitres.la
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%{prefix}/lib/libidnkitres.so
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%{prefix}/include/idn/*
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews%changelog
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews* Web May 15 2002 Motoyuki Kasahara <m-kasahr@sra.co.jp>
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews- 1.0beta2, experimental.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews* Mon May 28 2001 MANABE Takashi <manabe@dsl.gr.jp>
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews- include runmdn, libmdnresolv
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews* Mon Apr 4 2001 Motoyuki Kasahara <m-kasahr@sra.co.jp>
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews- 2.1 release
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews* Mon Apr 4 2001 Motoyuki Kasahara <m-kasahr@sra.co.jp>
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews- 2.0.1 release
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews* Mon Apr 2 2001 MANABE Takashi <manabe@dsl.gr.jp>
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews- 2.0 release
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews* Fri Mar 3 2001 MANABE Takashi <manabe@dsl.gr.jp>
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews- 1.3 release
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews* Mon Dec 6 2000 MANABE Takashi <manabe@dsl.gr.jp>
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews- add brace/lace functions to libmdnresolv(mdnkit-1.2-runmdn.patch)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews- include /var/dnsproxy
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews- change files section for compressed man pages
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews* Mon Nov 27 2000 Makoto Ishisone <ishisone@sra.co.jp>
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews- 1.2 release
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews* Thu Nov 2 2000 MANABE Takashi <manabe@dsl.gr.jp>
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews- 1.1 release
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews* Fri Oct 27 2000 MANABE Takashi <manabe@dsl.gr.jp>
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews- dnsproxy.patch1
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews- move libmdnresolv.{la,so} from mdnkit-devel to mdnkit package
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews* Wed Oct 18 2000 MANABE Takashi <manabe@dsl.gr.jp>
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews- 1.0 release