瀏覽代碼

new package: nedit 5.3 (Nirvana Text Editor)

Christoph Schug 22 年之前
父節點
當前提交
83ad058d86
共有 1 個文件被更改,包括 122 次插入0 次删除
  1. 122 0
      nedit/nedit.spec

+ 122 - 0
nedit/nedit.spec

@@ -0,0 +1,122 @@
+##
+##  nedit.spec -- OpenPKG RPM Specification
+##  Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
+##  Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
+##  Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.com/>
+##
+##  Permission to use, copy, modify, and distribute this software for
+##  any purpose with or without fee is hereby granted, provided that
+##  the above copyright notice and this permission notice appear in all
+##  copies.
+##
+##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+##  SUCH DAMAGE.
+##
+
+#   package information
+Name:         nedit
+Summary:      Nirvana Text Editor
+URL:          http://www.nedit.org/
+Vendor:       Mark Edel, et al.
+Packager:     The OpenPKG Project
+Distribution: OpenPKG [JUNK]
+Group:        Editor
+License:      GPL
+Version:      5.3
+Release:      20031024
+
+#   list of sources
+Source0:      ftp://ftp.nedit.org/pub/v5_3/nedit-%{version}-source.tar.bz2
+
+#   build information
+Prefix:       %{l_prefix}
+BuildRoot:    %{l_buildroot}
+BuildPreReq:  OpenPKG, openpkg >= 20030103, X11, openmotif, make, gcc
+PreReq:       OpenPKG, openpkg >= 20030103, X11, openmotif
+AutoReq:      no
+AutoReqProv:  no
+
+%description
+    NEdit is a multi-purpose text editor for the X Window System, which
+    combines a standard, easy to use, graphical user interface with the
+    thorough functionality and stability required by users who edit text
+    eight hours a day. It provides intensive support for development in
+    a wide variety of languages, text processors, and other tools, but
+    at the same time can be used productively by just about anyone who
+    needs to edit text.
+
+%prep
+    %setup -q
+
+%build
+    CC="%{l_cc}"
+    AR="ar"
+    ARFLAGS="-urs"
+    CFLAGS="%{l_cppflags} %{l_cflags} -I`%{l_prefix}/etc/rc --query x11_incdir`"
+    LIBS="%{l_ldflags} -L`%{l_prefix}/etc/rc --query x11_libdir`"
+    LIBS="$LIBS -Wl,-Bstatic -lXm"
+    LIBS="$LIBS -Wl,-Bdynamic -lXmu -lXp -lXpm -lXext -lXt -lSM -lICE -lX11 -lm"
+
+    case "%{l_platform -t}" in
+        *-freebsd* )
+            CFLAGS="$CFLAGS -DUSE_DIRENT -DUSE_LPR_PRINT_CMD"
+            ;;
+        *-linux* )
+            CFLAGS="$CFLAGS -DUSE_DIRENT -DUSE_LPR_PRINT_CMD"
+            ;;
+        *-sunos5.* )
+            CFLAGS="$CFLAGS -DUSE_DIRENT"
+            LIBS="$LIBS -lsocket -lnsl"
+            ;;
+        *)
+            echo "Sorry, unsupported architecture '%{l_platform -t}'" |\
+                %{l_rpmtool} msg -b -t error 1>&2
+            exit 1
+            ;;
+    esac
+
+    MAKEFILE="makefiles/Makefile.openpkg"
+    rm -f $MAKEFILE 2>/dev/null || true
+    for i in CC AR ARFLAGS CFLAGS LIBS; do
+        echo "$i=${!i}" >>$MAKEFILE
+    done
+    echo "include Makefile.common" >>$MAKEFILE
+
+    %{l_make} %{l_mflags -O} openpkg
+
+%install
+    rm -rf $RPM_BUILD_ROOT
+
+    %{l_shtool} mkdir -f -p -m 755 \
+        $RPM_BUILD_ROOT%{l_prefix}/bin \
+        $RPM_BUILD_ROOT%{l_prefix}/man/man1
+    %{l_shtool} install -c -s -m 755 \
+        source/nc \
+        $RPM_BUILD_ROOT%{l_prefix}/bin/neditc
+    %{l_shtool} install -c -s -m 755 \
+        source/nedit \
+        $RPM_BUILD_ROOT%{l_prefix}/bin/
+    %{l_shtool} install -c -m 644 \
+        doc/nc.man \
+        $RPM_BUILD_ROOT%{l_prefix}/man/man1/neditc.1
+    %{l_shtool} install -c -m 644 \
+        doc/nedit.man \
+        $RPM_BUILD_ROOT%{l_prefix}/man/man1/nedit.1
+
+    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
+
+%files -f files
+
+%clean
+    rm -rf $RPM_BUILD_ROOT
+