rpms/emacs-common-pmd/devel emacs-common-pmd.spec, NONE, 1.1 import.log, NONE, 1.1 pmd-emacs-0.6.patch, NONE, 1.1 pmd.el, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Jerry James
jjames at fedoraproject.org
Wed Sep 9 21:28:12 UTC 2009
- Previous message (by thread): rpms/nsca/EL-5 nsca.spec,1.2,1.3
- Next message (by thread): rpms/emacs-common-pmd/F-11 emacs-common-pmd.spec, NONE, 1.1 pmd-emacs-0.6.patch, NONE, 1.1 pmd.el, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jjames
Update of /cvs/pkgs/rpms/emacs-common-pmd/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31911/devel
Modified Files:
.cvsignore sources
Added Files:
emacs-common-pmd.spec import.log pmd-emacs-0.6.patch pmd.el
Log Message:
Initial Rawhide import.
--- NEW FILE emacs-common-pmd.spec ---
%global pkg pmd
%global pkgname pmd-emacs
%if %($(pkg-config emacs) ; echo $?)
%global emacs_version 22.1
%global emacs_lispdir %{_datadir}/emacs/site-lisp
%global emacs_startdir %{_datadir}/emacs/site-lisp/site-start.d
%else
%global emacs_version %(pkg-config emacs --modversion)
%global emacs_lispdir %(pkg-config emacs --variable sitepkglispdir)
%global emacs_startdir %(pkg-config emacs --variable sitestartdir)
%endif
%if %($(pkg-config xemacs) ; echo $?)
%global xemacs_version 21.5
%global xemacs_lispdir %{_datadir}/xemacs/site-packages/lisp
%global xemacs_startdir %{_datadir}/xemacs/site-packages/lisp/site-start.d
%else
%global xemacs_version %(pkg-config xemacs --modversion)
%global xemacs_lispdir %(pkg-config xemacs --variable sitepkglispdir)
%global xemacs_startdir %(pkg-config xemacs --variable sitestartdir)
%endif
Name: emacs-common-%{pkg}
Version: 0.6
Release: 2%{?dist}
Summary: An interface to PMD for Emacs
Group: Development/Tools
License: GPLv2+
URL: http://pmd.sourceforge.net/
Source0: http://downloads.sourceforge.net/pmd/pmd-emacs-%{version}.zip
Source1: pmd.el
# This patch has not been sent upstream, since it is (mostly) Fedora specific.
# It does the following:
# - Adds (require 'compile) so that compile-mode related functions and
# variables are defined.
# - Changes the default path to the Java binary to /usr/bin/java.
# - Removes the pmd-home variable, since it is used by code that assumes a
# directory structure that does not exist in the Fedora PMD package.
# - Replaces the pmd-xemacsp variables with (featurep 'xemacs). The latter
# form is recognized by the Emacs byte compiler, and results in fewer
# warnings and more efficient code than the former.
# - Changes the definitions of pmd-classpath and pmd-jar to match the locations
# of PMD-related JAR files on Fedora.
# - On Emacs, uses compilation-start instead of the obsolete compile-internal.
Patch0: pmd-emacs-0.6.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: emacs emacs-el xemacs xemacs-devel xemacs-packages-extra
%description
%{pkgname} supports the invocation of PMD from within (X)Emacs. Specifically,
it supplies functions pmd-current-buffer and pmd-current-dir, and enables
parsing of the resulting list of PMD complaints so that, for example,
next-error will walk through the list correctly.
This package contains the files common to both the GNU Emacs and XEmacs
%{pkgname} packages.
%package -n emacs-%{pkg}
Summary: Compiled elisp files to run %{pkgname} under GNU Emacs
Group: Development/Tools
Requires: emacs(bin) >= %{emacs_version}
Requires: emacs-common-%{pkg} = %{version}-%{release}
Requires: pmd
%description -n emacs-%{pkg}
This package contains the byte compiled elisp packages to run %{pkgname} with
GNU Emacs.
%package -n emacs-%{pkg}-el
Summary: Elisp source files for %{pkgname} under GNU Emacs
Group: Development/Tools
Requires: emacs-%{pkg} = %{version}-%{release}
%description -n emacs-%{pkg}-el
This package contains the elisp source files for %{pkgname} under GNU Emacs.
You do not need to install this package to run %{pkgname}. Install the
emacs-%{pkg} package to use %{pkgname} with GNU Emacs.
%package -n xemacs-%{pkg}
Summary: Compiled elisp files to run %{pkgname} under XEmacs
Group: Development/Tools
Requires: xemacs(bin) >= %{xemacs_version}
Requires: xemacs-packages-extra
Requires: emacs-common-%{pkg} = %{version}-%{release}
Requires: pmd
%description -n xemacs-%{pkg}
This package contains the byte compiled elisp packages to run %{pkgname} with
XEmacs.
%package -n xemacs-%{pkg}-el
Summary: Elisp source files for %{pkgname} under XEmacs
Group: Development/Tools
Requires: xemacs-%{pkg} = %{version}-%{release}
%description -n xemacs-%{pkg}-el
This package contains the elisp source files for %{pkgname} under XEmacs.
You do not need to install this package to run %{pkgname}. Install the
xemacs-%{pkg} package to use %{pkgname} with XEmacs.
%prep
%setup -q -n %{pkgname}-%{version}
%patch0 -p1
chmod a-x pmd.el
%build
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{emacs_lispdir}/%{pkg}
mkdir -p $RPM_BUILD_ROOT%{emacs_startdir}
emacs -batch -no-site-file -f batch-byte-compile pmd.el
cp -p pmd.el* $RPM_BUILD_ROOT%{emacs_lispdir}/%{pkg}
cp -p %{SOURCE1} $RPM_BUILD_ROOT%{emacs_startdir}
mkdir -p $RPM_BUILD_ROOT%{xemacs_lispdir}/%{pkg}
mkdir -p $RPM_BUILD_ROOT%{xemacs_startdir}
rm -f pmd.elc
xemacs -batch -no-site-file -f batch-byte-compile pmd.el
cp -p pmd.el* $RPM_BUILD_ROOT%{xemacs_lispdir}/%{pkg}
cp -p %{SOURCE1} $RPM_BUILD_ROOT%{xemacs_startdir}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc CHANGELOG INSTALL LICENSE.txt
%files -n emacs-%{pkg}
%defattr(-,root,root,-)
%dir %{emacs_lispdir}/%{pkg}
%{emacs_lispdir}/%{pkg}/%{pkg}.elc
%{emacs_startdir}/%{pkg}.el
%files -n emacs-%{pkg}-el
%defattr(-,root,root,-)
%{emacs_lispdir}/%{pkg}/%{pkg}.el
%files -n xemacs-%{pkg}
%defattr(-,root,root,-)
%dir %{xemacs_lispdir}/%{pkg}
%{xemacs_lispdir}/%{pkg}/%{pkg}.elc
%{xemacs_startdir}/%{pkg}.el
%files -n xemacs-%{pkg}-el
%defattr(-,root,root,-)
%{xemacs_lispdir}/%{pkg}/%{pkg}.el
%changelog
* Fri Aug 21 2009 Jerry James <loganjerry at gmail.com> - 0.6-2
- Package structure and naming cleanups to adhere to Fedora guidelines
* Wed Jan 21 2009 Jerry James <loganjerry at gmail.com> - 0.6-1
- Initial package
--- NEW FILE import.log ---
emacs-common-pmd-0_6-2_fc11:HEAD:emacs-common-pmd-0.6-2.fc11.src.rpm:1252531609
pmd-emacs-0.6.patch:
pmd.el | 43 ++++++++++++++-----------------------------
1 file changed, 14 insertions(+), 29 deletions(-)
--- NEW FILE pmd-emacs-0.6.patch ---
diff -dur pmd-emacs-0.6.ORIG/pmd.el pmd-emacs-0.6/pmd.el
--- pmd-emacs-0.6.ORIG/pmd.el 2005-10-24 13:21:45.000000000 -0600
+++ pmd-emacs-0.6/pmd.el 2009-01-21 12:42:49.000000000 -0700
@@ -85,20 +85,16 @@
;; to *PMD*. Output format is in XML. I will work in trying to
;; get a better, easier to read format for everyone.
+(require 'compile)
(defgroup pmd nil "PMD"
:group 'emacs)
-(defcustom pmd-java-home "/usr/local/bin/java"
+(defcustom pmd-java-home "/usr/bin/java"
"Java binary to run PMD with."
:type 'file
:group 'pmd )
-(defcustom pmd-home "~/pmd"
- "Directory where PMD is installed."
- :type 'directory
- :group 'pmd)
-
(defcustom pmd-ruleset-list (list "basic" "braces" "clone" "codesize" "controversial" "coupling"
"design" "finalizers" "imports" "javabeans" "junit" "logging-java"
"naming" "optimizations" "strictexception" "strings" "sunsecure"
@@ -112,8 +108,6 @@
;;Inner workings
;;-------------------------
-(defconst pmd-xemacsp (string-match "XEmacs" (emacs-version)))
-
(defun pmd-help ()
"Help for `pmd-mode'."
(interactive)
@@ -144,27 +138,16 @@
(pmd-file-or-dir (file-name-directory (buffer-file-name))))
(defun pmd-classpath ()
- (let* ((path-separator (if (eq system-type 'windows-nt) ";" ":"))
- (path-slash (if (eq system-type 'windows-nt) "\\" "/"))
- (pmd-etc (concat pmd-home "etc"))
- (pmd-lib (concat pmd-home path-slash "lib" path-slash)))
- (concat "\'"
- pmd-etc path-separator
- (mapconcat
- (lambda (path)
- path)
- (directory-files pmd-lib t "\\.jar$")
- path-separator)
- "\'")))
+ (let* ((path-separator (if (eq system-type 'windows-nt) ";" ":")))
+ (concat "\'"
+ "/usr/share/java/jakarta-oro.jar" path-separator
+ "/usr/share/java/jaxen.jar" path-separator
+ "/usr/share/java/xerces-j2.jar" path-separator
+ "/usr/share/java/xml-commons-apis.jar"
+ "\'")))
(defun pmd-jar ()
- (let* ((path-separator (if (eq system-type 'windows-nt) ";" ":"))
- (path-slash (if (eq system-type 'windows-nt) "\\" "/"))
- (pmd-etc (concat pmd-home "etc"))
- (pmd-lib (concat pmd-home path-slash "lib" path-slash)))
- (concat "\'"
- (car (directory-files pmd-lib t ".*pmd-.*\\.jar$"))
- "\'")))
+ "/usr/share/java/pmd.jar")
;; (defun pmd-file-or-dir (target)
;; "Run PMD on the given target (file or dir)"
@@ -199,7 +182,7 @@
;; Force save-some-buffers to use the minibuffer
;; to query user about whether to save modified buffers.
(if (and (eq system-type 'windows-nt)
- (not pmd-xemacsp))
+ (not (featurep 'xemacs)))
(let ((temp last-nonmenu-event))
;; The next line makes emacs think that jde-jalopy
;; was invoked from the minibuffer, even when it
@@ -208,7 +191,9 @@
(save-some-buffers (not compilation-ask-about-save) nil)
(setq last-nonmenu-event temp))
(save-some-buffers (not compilation-ask-about-save) nil))
- (compile-internal pmd-command "No more errors" "PMD")))
+ (if (featurep 'xemacs)
+ (compile-internal pmd-command "No more errors" "PMD")
+ (compilation-start pmd-command))))
(provide 'pmd)
--- NEW FILE pmd.el ---
(add-to-list 'load-path "/usr/share/xemacs/site-packages/lisp/pmd")
(autoload 'pmd-current-buffer "pmd" "PMD Mode" t)
(autoload 'pmd-current-dir "pmd" "PMD Mode" t)
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/emacs-common-pmd/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore 9 Sep 2009 16:12:47 -0000 1.1
+++ .cvsignore 9 Sep 2009 21:28:09 -0000 1.2
@@ -0,0 +1 @@
+pmd-emacs-0.6.zip
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/emacs-common-pmd/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources 9 Sep 2009 16:12:47 -0000 1.1
+++ sources 9 Sep 2009 21:28:10 -0000 1.2
@@ -0,0 +1 @@
+35296ccef798e21cf3b6815a713c1147 pmd-emacs-0.6.zip
- Previous message (by thread): rpms/nsca/EL-5 nsca.spec,1.2,1.3
- Next message (by thread): rpms/emacs-common-pmd/F-11 emacs-common-pmd.spec, NONE, 1.1 pmd-emacs-0.6.patch, NONE, 1.1 pmd.el, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list