Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Additional fixes to slashcode-dearchve:
- Removes backticks from detected nicknames (API has problems with these). - Fixes problems where newlines appeared in the extracted nickname. (along with the extra HTML). This caused problems with nicknames that may have been in the database, but weren't getting found. Makefile: Fixed minor syntax errors in changes for RPM support. Makefile.NEW: Proposed new makefile which replaces "#!/usr/bin/perl" with whatever is appropriate on the installed system. This file is in alpha state, but please test it out on your systems if you get the chance: make -f Makefile.NEW INIT=... GROUP=... PERL=....
- Loading branch information
Showing
3 changed files
with
226 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
# This code is a part of Slash, and is released under the GPL. | ||
# Copyright 1997-2001 by Open Source Development Network. See README | ||
# and COPYING for more information, or see http://slashcode.com/. | ||
# $Id$ | ||
|
||
## | ||
## Makefile -- Current one for Slash | ||
## | ||
|
||
# the used tools | ||
VERSION = 1.1.4-bender | ||
DISTNAME = slash | ||
DISTVNAME = $(DISTNAME)-$(VERSION) | ||
|
||
SHELL = /bin/sh | ||
PERL = perl | ||
NOOP = $(SHELL) -c true | ||
RM_RF = rm -rf | ||
RM = rm -f | ||
SUFFIX = .gz | ||
COMPRESS = gzip --best | ||
TAR = tar | ||
TARFLAGS = cvf | ||
PREOP = @$(NOOP) | ||
POSTOP = @$(NOOP) | ||
TO_UNIX = @$(NOOP) | ||
PREFIX = /usr/local/slash | ||
INIT = /etc | ||
USER = nobody | ||
GROUP = nobody | ||
CP = cp | ||
|
||
# Perl scripts, grouped by directory. | ||
BINFILES = `find bin -name CVS -prune -o -type f -print` | ||
SBINFILES = `find sbin -name CVS -prune -o -type f -print` | ||
THEMEFILES = `find themes -name CVS -prune -o -name \*.pl -print` | ||
PLUGINFILES = `find plugins -name CVS -prune -o -name \*.pl -print` | ||
|
||
# install the shared object file into Apache | ||
# We should run a script on the binaries to get the right | ||
# version of perl. | ||
# I should also grab an install-sh instead of using $(CP) | ||
slash: | ||
if ! [ $(RPM) ] ; then \ | ||
(cd Slash; $(PERL) Makefile.PL; make); \ | ||
else \ | ||
(cd Slash; $(PERL) Makefile.PL INSTALLSITEARCH=/var/tmp/slash-buildroot/usr/local/lib/perl/5.6.0 INSTALLSITELIB=/var/tmp/slash-buildroot/usr/local/share/perl/5.6.0; make); \ | ||
fi | ||
|
||
plugins: | ||
if ! [ $(RPM) ] ; then \ | ||
(cd plugins/Search; $(PERL) Makefile.PL; make); \ | ||
(cd plugins/Journal; $(PERL) Makefile.PL; make); \ | ||
(cd plugins/Ladybug; $(PERL) Makefile.PL; make); \ | ||
else \ | ||
(cd plugins/Search; $(PERL) Makefile.PL INSTALLSITEARCH=/var/tmp/slash-buildroot/usr/local/lib/perl/5.6.0 INSTALLSITELIB=/var/tmp/slash-buildroot/usr/local/share/perl/5.6.0; make); \ | ||
(cd plugins/Journal; $(PERL) Makefile.PL INSTALLSITEARCH=/var/tmp/slash-buildroot/usr/local/lib/perl/5.6.0 INSTALLSITELIB=/var/tmp/slash-buildroot/usr/local/share/perl/5.6.0; make); \ | ||
(cd plugins/Ladybug; $(PERL) Makefile.PL INSTALLSITEARCH=/var/tmp/slash-buildroot/usr/local/lib/perl/5.6.0 INSTALLSITELIB=/var/tmp/slash-buildroot/usr/local/share/perl/5.6.0; make); \ | ||
fi | ||
|
||
all: install | ||
|
||
install: slash plugins | ||
# Need to toss in a script here that will fix prefix so | ||
# that if someone wants to install in a different | ||
# directory it will be easy | ||
# Lets go install the libraries | ||
(cd Slash; make install) | ||
# Lets go install the plugin's libraries | ||
if ! [ $(RPM) ] ; then \ | ||
(cd plugins/Search; $(PERL) Makefile.PL; make install); \ | ||
(cd plugins/Journal; $(PERL) Makefile.PL; make install); \ | ||
(cd plugins/Ladybug; $(PERL) Makefile.PL; make install); \ | ||
else \ | ||
(cd plugins/Search; $(PERL) Makefile.PL INSTALLSITEARCH=/var/tmp/slash-buildroot/usr/local/lib/perl/5.6.0 INSTALLSITELIB=/var/tmp/slash-buildroot/usr/local/share/perl/5.6.0; make install); \ | ||
(cd plugins/Journal; $(PERL) Makefile.PL INSTALLSITEARCH=/var/tmp/slash-buildroot/usr/local/lib/perl/5.6.0 INSTALLSITELIB=/var/tmp/slash-buildroot/usr/local/share/perl/5.6.0; make install); \ | ||
(cd plugins/Ladybug; $(PERL) Makefile.PL INSTALLSITEARCH=/var/tmp/slash-buildroot/usr/local/lib/perl/5.6.0 INSTALLSITELIB=/var/tmp/slash-buildroot/usr/local/share/perl/5.6.0; make install); \ | ||
fi | ||
|
||
# Create all necessary directories. | ||
install -d $(PREFIX)/bin/ $(PREFIX)/sbin $(PREFIX)/sql/ $(PREFIX)/sql/mysql/ $(PREFIX)/sql/postgresql $(PREFIX)/themes/ $(PREFIX)/themes/slashcode/htdocs/ $(PREFIX)/themes/slashcode/sql/ $(PREFIX)/themes/slashcode/sql/postgresql $(PREFIX)/themes/slashcode/sql/mysql $(PREFIX)/themes/slashcode/backup $(PREFIX)/themes/slashcode/logs/ $(PREFIX)/plugins/ $(PREFIX)/httpd/ | ||
|
||
# Insure we use the proper perl interpreter in all scripts that we install. | ||
# Note the use of Perl as opposed to dirname(1) and basename(1) which | ||
# may or may not exist on any given system. | ||
# <jamie> I would suggest, Cliff, instead of using sed to write temp files to /tmp, use perl -i.bak -pe, and delete the .bak files immediately afterwards. | ||
# <jamie> Writing files with predictable names to /tmp and then assuming they still contain the same data 140 microseconds later is a small but nonzero security risk... | ||
(if [ "$(PERL)" != "perl" ]; then \ | ||
replacewith=`$(PERL) -MConfig -e 'print $$Config{startperl}' | sed -e 's/\([.?/*]\)/\\\\\1/g'`; \ | ||
echo "REPLACEWITH=$$replacewith"; \ | ||
for f in $(BINFILES) $(SBINFILES) $(THEMEFILES) $(PLUGINFILES); do \ | ||
b=`echo $$f | $(PERL) -MFile::Basename -e 'print basename(<STDIN>)'`; \ | ||
d=`echo $$f | $(PERL) -MFile::Basename -e 'print dirname(<STDIN>)'`; \ | ||
cat $$f | sed -e "s|#!/usr/bin/perl|$$replacewith|" > \ | ||
/tmp/$$b.temp; \ | ||
install -D /tmp/$$b.temp $(PREFIX)/$$d/$$b; \ | ||
rm /tmp/$$b.temp; \ | ||
echo "Installing $$f in $(PREFIX)/$$d"; \ | ||
done; \ | ||
fi) | ||
|
||
#install -D bin/install-slashsite bin/install-plugin bin/tailslash bin/template-tool $(PREFIX)/bin/ | ||
#install -D sbin/slashd sbin/portald sbin/moderatord sbin/dailyStuff $(PREFIX)/sbin/ | ||
cp sql/mysql/slashschema_create.sql $(PREFIX)/sql/mysql/schema.sql | ||
cp sql/postgresql/slashschema_create.sql $(PREFIX)/sql/postgresql/schema.sql | ||
if [ -f $(PREFIX)/httpd/slash.conf ]; then\ | ||
echo "Preserving old slash.conf"; \ | ||
else \ | ||
$(CP) httpd/slash.conf $(PREFIX)/httpd/slash.conf; \ | ||
fi | ||
|
||
$(CP) httpd/slash.conf $(PREFIX)/httpd/slash.conf.def | ||
|
||
# Note the use of -u in the copy commands below. We don't want to overwrite | ||
# any of the perl scritps we've already modified and put into place! | ||
|
||
# Now for the default theme (be nice when this goes in themes) | ||
cp -ruv plugins/* $(PREFIX)/plugins/ | ||
# Now all other themes | ||
cp -ruv themes/* $(PREFIX)/themes | ||
|
||
# this needs BSD support (and Solaris) | ||
if [ -d /etc/init.d ]; then\ | ||
install utils/slashd /etc/init.d/; \ | ||
ln -s -f ../init.d/slashd $(INIT)/rc3.d/S99slashd; \ | ||
ln -s -f ../init.d/slashd $(INIT)/rc6.d/K99slashd; \ | ||
elif [ -d /etc/init.d/rc.d/]; then \ | ||
install utils/slashd /etc/rc.d/init.d/ \ | ||
ln -s -f ../init.d/slashd /etc/rc.d/rc3.d/S99slashd; \ | ||
ln -s -f ../init.d/slashd /etc/rc.d/rc6.d/K99slashd; \ | ||
else \ | ||
echo "This is either BSD or some other OS I do not understand"; \ | ||
echo "You will need to look at how to install utils/slashd"; \ | ||
fi | ||
|
||
touch $(PREFIX)/slash.sites | ||
chown $(USER):$(GROUP) $(PREFIX) | ||
chown -R $(USER):$(GROUP) $(PREFIX)/themes | ||
chown -R $(USER):$(GROUP) $(PREFIX)/sbin | ||
chown -R $(USER):$(GROUP) $(PREFIX)/bin | ||
chown -R $(USER):$(GROUP) $(PREFIX)/sql | ||
chown -R $(USER):$(GROUP) $(PREFIX)/plugins | ||
# Add a @ to suppress output of the echo's | ||
@echo "+--------------------------------------------------------+"; \ | ||
echo "| All done. |"; \ | ||
echo "| If you want to let Slash handle your httpd.conf file |"; \ | ||
echo "| go add: |"; \ | ||
echo "| |"; \ | ||
echo "| Include $(PREFIX)/httpd/slash.conf |"; \ | ||
echo "| |"; \ | ||
echo "| to your httpd.conf for apache. |"; \ | ||
echo "| If not, cat its content into your httpd.conf file. |"; \ | ||
echo "| |"; \ | ||
echo "| Thanks for installing Slash. |"; \ | ||
echo "+--------------------------------------------------------+"; \ | ||
|
||
|
||
reload: install | ||
apachectl stop | ||
apachectl start | ||
# cleanup | ||
clean: | ||
|
||
dist: $(DISTVNAME).tar$(SUFFIX) | ||
|
||
$(DISTVNAME).tar$(SUFFIX) : distdir | ||
$(PREOP) | ||
$(TO_UNIX) | ||
$(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME) | ||
$(RM_RF) $(DISTVNAME) | ||
$(COMPRESS) $(DISTVNAME).tar | ||
$(POSTOP) | ||
|
||
distdir : | ||
$(RM_RF) $(DISTVNAME) | ||
$(PERL) -MExtUtils::Manifest=manicopy,maniread \ | ||
-e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');" | ||
|
||
manifest : | ||
(cd Slash; make distclean) | ||
$(PERL) -MExtUtils::Manifest -e 'ExtUtils::Manifest::mkmanifest' | ||
|
||
rpm : | ||
rpm -ba slash.spec | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters