summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile43
-rw-r--r--qarsh.spec43
2 files changed, 59 insertions, 27 deletions
diff --git a/Makefile b/Makefile
index 55b6c97..3d5d02d 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,9 @@ LOADLIBES := -lxml2
COMMON := qarsh_packet.c sockutil.c
-all: qarshd qarsh qacp btimed btimec
+TARGETS := qarshd qarsh qacp btimed btimec
+
+all: $(TARGETS)
qarshd: qarshd.c $(COMMON)
qarsh: qarsh.c $(COMMON)
@@ -14,31 +16,18 @@ qacp: qacp.c $(COMMON)
btimed: btimed.c
btimec: btimec.c btime.c
-install: qarsh qarshd
- @echo Installing qarsh daemon and client
- install -d ${STSDIR}/bin/
- install qacp ${STSDIR}/bin
- install qarsh ${STSDIR}/bin
- install qarshd ${STSDIR}/bin
-
- @echo "Installing btime deamon and test client"
- @install -d ${STSDIR}/bin/
- @install btimed ${STSDIR}/bin
- @install btimec ${STSDIR}/bin
-
-uninstall:
- ${UNINSTALL} qacp ${STSDIR}/bin
- ${UNINSTALL} qarsh ${STSDIR}/bin
- ${UNINSTALL} qarshd ${STSDIR}/bin
- ${UNINSTALL} btimed ${STSDIR}/bin
- ${UNINSTALL} btimec ${STSDIR}/bin
+install: all
+ install -D qacp $(INSTROOT)/usr/bin/qacp
+ install -D qarsh $(INSTROOT)/usr/bin/qarsh
+ install -D qarshd $(INSTROOT)/usr/sbin/qarshd
+ install -D btimed $(INSTROOT)/usr/sbin/btimed
+ install -D btimec $(INSTROOT)/usr/bin/btimec
clean:
- /bin/rm -f *.o
-
-clobber:
- /bin/rm -f qacp
- /bin/rm -f qarsh
- /bin/rm -f qarshd
- /bin/rm -f btimec
- /bin/rm -f btimed
+ $(RM) $(TARGETS)
+
+qarsh.tar.bz2: qarsh.spec
+ tar cjf $@ .
+
+rpm: qarsh.tar.bz2 qarsh.spec
+ rpmbuild -ta $<
diff --git a/qarsh.spec b/qarsh.spec
new file mode 100644
index 0000000..9f2003c
--- /dev/null
+++ b/qarsh.spec
@@ -0,0 +1,43 @@
+Summary: QA Remote Shell
+Name: qarsh
+Version: 1.0
+Release: 1
+Group: QA
+License: GPL
+Buildroot: %{_tmppath}/%{name}-%{version}-root
+
+Source0: qarsh.tar.bz2
+
+%description
+qarsh is an rsh/ssh replacement designed for a testing environment. That means
+no encryption and no authentication. It also means that the return code is the
+same as the remote process and some signals are propogated to the remote
+process.
+
+%prep
+
+%setup -q -c
+
+%build
+[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
+mkdir -p %{buildroot}/
+make
+
+%install
+make install INSTROOT=$RPM_BUILD_ROOT
+
+%clean
+[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
+
+
+%files
+%defattr(-,root,root)
+/usr/bin/qarsh
+/usr/bin/qacp
+/usr/bin/btimec
+/usr/sbin/qarshd
+/usr/sbin/btimed
+
+%changelog
+* Thu Sep 13 2005 Nathan Straz <nstraz@redhat.com>
+- Initial packaging