Summary: A script for creating the device files in /dev.
Summary(ja): /dev 以下のデバイスファイルを作成するスクリプト
Name: MAKEDEV
Version: 3.24
Release: 2%{?_dist_release}
License: GPLv2
Group: System Environment/Base
URL: http://www.lanana.org/docs/device-list/

Source: MAKEDEV-%{version}-1.tar.gz
Source10: fedora-changelog
Patch10: MAKEDEV-3.24-vine.patch

BuildRoot: %{_tmppath}/%{name}-root
Requires(pre): shadow-utils
Requires(pre): sed, coreutils, mktemp

%description
This package contains the MAKEDEV program, which makes it easier to create
and maintain the files in the /dev directory.  /dev directory files
correspond to a particular device supported by Linux (serial or printer
ports, scanners, sound cards, tape drives, CD-ROM drives, hard drives,
etc.) and interface with the drivers in the kernel.

You should install the MAKEDEV package because the MAKEDEV utility makes
it easy to manage the /dev directory device files.

%description -l ja
このパッケージには MAKEDEV スクリプトが含まれています。これは /dev ディレ
クトリ以下のファイルを簡単に作成するものです。/dev ディレクトリのファイル
は、それぞれ Linux がサポートしているデバイス (シリアル/プリンタポート、
スキャナ、サウンドカード、テープデバイス、CD-ROM ドライブ、ハードディスク
等) に対応しており、カーネルのドライバがこれらのファイルを介してデバイス
にアクセスします。

MAKEDEV ユーティリティは /dev ディレクトリ以下のデバイスファイルを簡単に
作成すことができますので MAKEDEV パッケージをインストールしてください。

%prep
%setup -q
%patch10 -p1 -b .vine
cp %{SOURCE10} .

%build
%__make OPTFLAGS="$RPM_OPT_FLAGS"

%install
%__make install DESTDIR=$RPM_BUILD_ROOT devdir=/dev makedevdir=/sbin
rm -f $RPM_BUILD_ROOT/dev/MAKEDEV

%clean
rm -fr $RPM_BUILD_ROOT

%pre
# Add the floppy group and the vcsa user.
getent group floppy >/dev/null || groupadd -g 19 -r floppy
getent passwd vcsa >/dev/null || \
useradd -r -d /dev -s /sbin/nologin -u 69 \
    -c "virtual console memory owner" vcsa
exit 0

%triggerpostun -- dev < 3.22
if [ -x /sbin/MAKEDEV ]; then 
    /sbin/MAKEDEV null
    /sbin/MAKEDEV console
else
    /bin/mknod /dev/null c 1 3
    /bin/mknod /dev/console c 5 1
fi
if [ "$(/sbin/kernelversion)" == "2.4" ] ||
   ( [ "$(/sbin/kernelversion)" == "2.6" ] &&
     [ $(($(uname -r |cut -f1 -d-|cut -f3 -d.))) -lt 16 ] )
then
    mount --bind /.dev.static /dev ||:
    if [ -x /sbin/pam_console_apply ] ; then
        /sbin/pam_console_apply
    fi
fi

%files
%defattr(-,root,root)
%doc COPYING devices-2.6+.txt fedora-changelog
/sbin/MAKEDEV
%{_mandir}/man8/*
%{_sbindir}/mksock
%config(noreplace) %{_sysconfdir}/makedev.d

%changelog
* Tue Mar 02 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 3.24-2
- rebuilt with new toolchain

* Mon Mar 09 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 3.24-1
- new upstream release
- remove dev package.

* Thu Oct 16 2008 Shu KONNO <owa@bg.wakwak.com> 3.22-1vl5
- applied new versioning policy, spec in utf-8

* Thu Apr 05 2007 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 3.22-0vl5
- explicitly PreReq: coreutils instead of textutils and fileutils

* Sun Aug 27 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 3.22-0vl4
- make vcsa/floppy device on MAKEDEV's %%pre script.

* Wed Jul 19 2006 Shu KONNO <owa@bg.wakwak.com> 3.22-0vl3
- rebuild for x86_64

* Sun May 21 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 3.22-0vl2
- make null/console device in triggerpostun scripts

* Sat May 20 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 3.22-0vl1
- add dev subpackage for static device files.
  - initscripts will mount /.dev.static to /dev
    if kernel is not support udev.
- import changes from FC

* Wed Mar 08 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 3.21-1vl1
- update to 3.21-3 from FC

* Sat May 15 2004 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 3.3.13-1vl3
- include /dev/mouse (a symlink to /dev/input/mice) in the dev package
  please note this change (or revert) only applies to ppc archtecture

* Wed May 12 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 3.3.13-1vl2
- do not make mount a symlink to input/mice on non-ppc architecture.
- add "console" and "ptmx" to "generic" device
- add dv1394 device
- change linux1394 device owner from '$ROOT' to '$CONSOLE'.

* Mon May 10 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 3.3.13-1vl1
- merged with fedora package
  see %{_docdir}/%{name}-%{version}/fedora-changelog for detail.

* Wed Nov 14 2001 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- 2.5.2-1vl4
- fix change log

* Sun Nov 11 2001 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- 2.5.2-1vl3
- support /dev/hdi - hdt 

* Tue Jan 23 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
- 2.5.2-1vl2
- rebuild with new %%{_mandir} definition
- added Japanese summary and description

* Sat Nov 18 2000 MACHINO, Satoshi <machino@vinelinux.org> 2.5.2-1vl1
- build with gcc-2.95.3
- partially used rpmmacros

* Wed Mar 01 2000 Nalin Dahyabhai <nalin@redhat.com>
- add audioctl

* Fri Jan 28 2000 Nalin Dahyabhai <nalin@redhat.com>
- make vbi a symlink to vbi0
- make vtx a symlink to vtx0, use vtx from video4linux

* Sat Apr 17 1999 Michael K. Johnson <johnsonm@redhat.com>
- create version 2.5 with a great many devices added from the 2.2 kernel
  devices.txt

* Tue Apr 13 1999 Preston Brown <pbrown@redhat.com>
- close bug #2157

* Thu Mar 25 1999 Michael Johnson <johnsonm@redhat.com>
- sg unification
- nb devices

* Thu Mar 25 1999 Jakub Jelinek <jj@ultra.linux.cz>
- create correct /dev/console (c 5 1), support for SCSI
  disk devices sdi - sddx

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 9)

* Wed Jan 06 1999 Cristian Gafton <gafton@redhat.com>
- glibc 2.1

* Thu Aug 13 1998 Jeff Johnson <jbj@redhat.com>
- build root

* Fri Apr 24 1998 Prospector System <bugs@redhat.com>
- translations modified for de

* Thu Apr 23 1998 Prospector System <bugs@redhat.com>
- translations modified for fr, tr

* Thu Apr 23 1998 Erik Troan <ewt@redhat.com>
- fixed group add script (had -r instead of -o)

* Fri Apr 17 1998 Erik Troan <ewt@redhat.com>
- put -o option on groupadd after -g -- I hope Christian can tell me why

* Thu Apr 09 1998 Cristian Gafton <gafton@redhat.com>
- redirect groupadd call so that we're more quiet

* Fri Oct 24 1997 Michael K. Johnson <johnsonm@redhat.com>
- 2.3.1: use /usr/sbin/groupadd from new shadow utils

* Mon Sep 29 1997 Michael K. Johnson <johnsonm@redhat.com>
- Updated to 2.3, as Nick agreed to me making an interim release while
  he figures out whether he wants to be the maintainer.

* Wed Sep 03 1997 Erik Troan <ewt@redhat.com>
- made a noarch package

* Tue Jul 08 1997 Erik Troan <ewt@redhat.com>
- added dependencies